Overwork the plugin

* extract the username encoding and URL replacing into a method
* replace the username also in changeUrl (without logging, if no
  occurence of %s can be found)
Make this an official Gerrit plugin

* move to package com.googlesource.gerrit.plugins.avatars.external
* set copyright to "The Android Open Source Project"
Some commenting
Apply Google code style format