Roger Federer survived a tough couple of opening sets to beat Guido Pella 7-6 7-6 6-3 and reach the second round of Wimbledon.