Add instrumentation to MetadataCache

This does the following changes:
1. Adds instrumentation to MetadataCache
2. Makes the cache retention configurable
3. Makes the Type and Unit processor thread pool size configurable