Resolve callable reference expressions

 #KT-1183 In Progress
Refactor ClosureCodegen

Extract some methods, replace types with more generic (ExpressionCodegen ->
LocalLookup), make more stuff fields instead of parameters passed to every
method, annotate with Nullable/NotNull
Minor refactoring in CodegenBinding

- CLASS_FOR_FUNCTION slice was used for two purposes: to record closure classes
  for functions and for scripts. Separate this slice into two slices:
  CLASS_FOR_FUNCTION and CLASS_FOR_SCRIPT
- add classNameForAnonymousClass() overloaded method to CodegenBinding, taking
  a function descriptor (not a PSI element)
Extract static helpers to FunctionTypesUtil

Also move 'getInternalClassName' method from CodegenUtil to FunctionTypesUtil,
since it's related to function types
Minor refactoring in ExpressionCOdegen

Inline useless method, factor out resolveToCallableMethod logic from
resolveToCallable
invokeinterface FunctionN.invoke()

Instead of invokevirtual on FunctionImpl class, do invokeinterface on a
Function trait. This will allow to invoke functions on classes which don't
inherit from FunctionImpl classes.

Also rename the method to the more sensible name
Refactor ClosureCodegen

- make several commonly used parameters ClosureCodegen's fields
- take an arbitrary strategy for closure function body codegen
- don't make extra binding context lookups
Codegen for callable reference expressions
1