JCBC CacheStore leaks and other problems

Sorry this work is incomplete, still missing tests and a verification. Just sharing with @ttarrant