Better handling of many many users: refactor the caching mechanism

In our installation we had the following problem: The user base of our jenkins installation is very large. This resulted in a Problem when loading any page displaying the users - but only if the gravatar plugin was installed.

I tracked this down to find the culprit is the caching behavior of the gravatar plugin. So I took the liberty to refactor the plugin and improve the caching mechanism.

I also took the liberty to increase the test coverage and explicitly test the problem I had on our installation: The loading of the people-page should not take a very large time even when there are a lot of users.