The two-time Wimbledon champion’s withdrawal from the men’s semifinal means he loses his opportunity to expand his Grand Slam record to 23rd titles.