DatabaseCache: Background thread now pre-fetches databases to improve searching times.

Honestly, I probably went a bit overzealous with the RLock, but I'd
rather be safe than sorry when it comes to threading and race
conditions.