Added a cache for database user authentication.

This should cut down on the amount of database hits.

A small overview of how it works:

Fetch:
It reads from the cache if the user is in it. Otherwise it will try to
fetch the info from the database.

FetchUpdate:
Fetches information from the database and updates the cache. This is
used underneath in Fetch after checking the cache.

Login:
Tries to validate the credentials in the ClientID given. If the first
fetch fails to validate we assume the cache is invalid and try updating
it once before rejecting the credentials.