Roger Federer retires after teaming with Nadal in last match