Serena Williams says the nature of the anti-doping testing process almost stopped her from making a shock comeback.