Andy Murray has had hip surgery in bid to save career