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
Basic implementation of partial body resolve
Partial body resolve: more precise smart casts analysis for if-statement
Partial body resolve: more efficient for-loop handling
Partial body resolve: fixed bug
Partial body resolve: added test for do-while
Partial body resolve: more efficient handling of while
Partial body resolve: more efficient handling of loops
Partial body resolve: more efficient handling if-statements
Partial body resolve: don't be confused by exits after ?:
Fixed partial body resolve when element to resolve is not inside body
Partial body resolve: correct handing of this qualifier
Partial body resolve: added a test to fail if smart-casts will become too clever
Partial body resolve: processing of standard "error" function
Partial body resolve: to take source Kotlin callables with Nothing type from caches
Renames "possibly nothing" to "probably nothing"
Corrected test data for stub tests