Roger Federer bid an emotional goodbye to the sport after losing the double's tie against Frances Tiafoe and Jack Sock,