Small improvements

Simplify Ehcache integration classes structure
Test for Ehcache custom configuration
Make locking more safe:
- wrap locking algorithm into a SuperLock class that releases all locks in finalize
- release locks on exceptions