web: Factor out the DBusClient and DockerClient object caches.

We will use pattern also for the upcoming NetworkManager code.
It seems like we're using ```make_resource_cache``` before declaring it. Or am i missing something? Also, why are we leaking ```make_resource_cache``` into the global scope?