Three-time Olympic gold medallist has faced toxic online abuse and considered quitting over comments on her appearance.