Gravatar

Make gravatar work with proxies which require authorization and also some other minor fixes.

@ch3cooli: Can you please review? I'm not sure if all changes are needed (e.g. "Add missing lock", "do not call by value"). Also what about the error handling if downloading failed, did I implement it correctly?

Maybe we could also move the time setting code into the Download method.