Roger Federer wins six straight points on the bounce to come from the jaws of defeat to beat Australian John Millman and reach the fourth round.