Add ability to create memoized functions with custom maps

 - Remove cast in ResolveSession class
Rewrite to Kotlin (file rename): LockBasedLazyResolveStorageManager
Rewrite to Kotlin: LockBasedLazyResolveStorageManager
Replace direct usages of TopDownLazyResolveForJava with facade