Add local scope store caching support as well as do some refactoring to make it datastore scope aware and manage scope specific config. Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>