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.
Merge pull request #3227 from marchaefner/fixClassCompilation

Fix scope of external constructor reference / Refactor `Closure`