An emotional Andy Murray has revealed he plans to retire after Wimbledon but fears the pain of his hip injury may end his career earlier.