Batch partition loading from the metastore

OK here is the initial implementation that does batching based on time (a new parameter ``hive.metastore-partition-load-batch-interval`` is introduced) to address #1981 . Currently each hive-metastore thread does batching independently (instead of using locking and letting one thread do the batching as the same ``BackgroundCacheLoader`` is shared by all metastore threads). For keeping the state this implementation uses thread local variables to get rid of synchronization & make the code more concise. Once the code is ready to merge I will update the docs with the new parameter.
Acquiring the semaphore here is a bit brittle. It makes the code harder to follow and can result in a missed release if for some reason the call to submit fails or the task fails with an exception before releasing.

A better approach would be submit unconditionally and let the task do the acquire/release in a try...finally block.