JS: add simple optimizer
This is an attempt at bringing back an optimizer for the JS backend to make code sizes more manageable. The goal is to get code size similar or better than what GHCJS used to produce, without the performance hit and complexity of the GHCJS optimizer. It's a non-iterative analysis that is tuned towards optimizing common patterns produced by the JS code generator. Better code size should also reduce memory consumption when linking, thanks to smaller object files.
An initial version reduced code size of a "hello world" program by 26.9%, having only local variable renaming and dead/trivial assignment elimination. Additional functionality should improve this.
Edited by Luite Stegeman