Merge pull request #3224 from marchaefner/fixClassCompilation

Minor fixes for class compilation
Refactor closure compilation

* Break up `Closure` and merge `Closure.wrap` into `Base.compileClosure`
* Construct class closure directly in `Class.compileNode`
* Reuse `isLiteralArguments` in `Range.compileArray`
* Move all helpers to bottom of file
* Add test for #3063
Closes #3008 -- Fix scope of constructor reference

* Make scope of `Code` nodes accessible (prior to `compileNode`)
* Use correct scope for reference of external constructor.
* Remove unreachable code.