Federer lost in five sets to Grigor Dimitrov while Serena Williams cruised to a 44-minute win in the women’s quarterfinals.