Federer puts Swiss ahead in Davis Cup semi