web: Factor out the DBusClient and DockerClient object caches.

We will use this pattern also for the upcoming NetworkManager code.

Closes #628