Allow run_image_cache_manager_pass to hit db slave

Deployments that have a slave_connection configured can offload
read queries there. For deployments with no slave behavior
remains the same.

Change-Id: Ic443913883d80bdbc95385f8d3e21c0d855bb7db
Partially-implements: blueprint periodic-tasks-to-db-slave
Merge "Allow run_image_cache_manager_pass to hit db slave"