Debugger: use partialBodyResolve. Don't compete variables defined after context element
Kotlin builder: make sure that caches are lazily initialized (KT-6409)
Merge pull request #535 from JetBrains/rr/nik

Kotlin builder: make sure that caches are lazily initialized (KT-6409)
fix maven kotlin-js-tests
JS backend: fix Selenium test: fail on error loading javascript files
Changed file extension to '.kt'
 to preserve file history
Converted ConstraintSystem to Kotlin
Rewritten ConstraintPosition to Kotlin

Added ConstraintPositionKind
 (to be able to use enum constants from Java code)
Small refactoring in ConstraintSystemImpl
Extracted isMyTypeVariable, getMyTypeVariable
Fixes after merge

Added platform types fixes to rewritten to kotlin files
Rename: MyDeclarations -> ConstraintSystemTestData

Simplified code (used 'firstOrNull')
Added captured types and approximation

CapturedType captures type projection while solving the constraint system.
During the substitution type containing captured types is approximated
to get rid of captured types and (for simple cases) replace them with corresponding type projections.

Note that Array<Array< CapturedType(out Int) >> is (over)approximated by Array<out<Array<out Int>>

See 'Mixed-site variance' by Ross Tate for details.

 #KT-2570 Fixed
 #KT-2872 Fixed
 #KT-3213 Fixed
Capture types only on the top level
Refactoring: made code in 'processDeclaredBoundConstraints' more kotlin
KT-6320 AssertionError in ConstraintSystem(The constraint shouldn't contain different type variables on both sides: Y <: X)
  #KT-6320 Fixed
Don't add a constraint T <: DONT_CARE from upper bounds
Added description of 'FILE' directive for diagnostic tests
Preserve nullability while substituting captured types
Small refactoring
 Made vararg parameters have Array<out T> type
 instead of simply Array<T>
  #KT-1638 Fixed
  #KT-2163 Fixed
  #KT-3213 Fixed
  #KT-4172 Fixed
  #KT-5534 Fixed