Google has fixed a security flaw that exposed the email addresses of YouTube users, a potentially massive privacy breach.