Added CacheService

Extracted all disk caching logic to a CacheService with the following
implementations:

* DefaultCacheService is a dummy implementation. This effectively
 disables disk caching

* SerializationCacheService uses ObjectInput/OutputStream to serialize
entries to disk.

* MapDBCache uses a MapDB database to manage writes to disk.