Federer to miss rest of the season following knee surgery