Fix #825: ParamDefs of tailrec methods should be mutable.

Considering them as immutable was fine for the purposes of
JSDesugaring, but not for the inliner, causing subtle bugs.

This commit simulates the binary compatibility scenario by
not changing the compiler, and relying on the deserializer
to apply hacks to fix old IR. A follow up commit will
update the compiler to emit correct IR directly.
Make ParamDefs of tailrec methods mutable in the compiler.
Fix desugaring in an obscure case with while(true).
Make methods of j.l.Math optimizable.

* Avoid to use native JS functions when possible: the optimizer
  does not know about these functions and cannot reason about
  their behavior.
* Add @inline to all simple methods.
* Make PI and E 'final val', because that's what they are as Java
  static final fields + it is better optimized.
Rerun a dce after the inliner.
Merge pull request #832 from sjrd/optimizable-jl-math-methods

Make methods of j.l.Math optimizable.
Merge pull request #830 from sjrd/fix-desugar-var-while-true

Fix desugaring in an obscure case with while(true).
Merge pull request #829 from sjrd/mutable-param-defs-alt

Fix #825: ParamDefs of tailrec methods should be mutable.
Merge pull request #833 from sjrd/dce-after-inliner

Rerun a dce after the inliner.
Print if-else-if chains in a nicer way.
Consider more simple methods for inlining.
Fold If constructs.
Discard side-effects of statements.
Optimize pattern matches.
Merge pull request #835 from sjrd/opt-pattern-matches

Several new optimizations that give better translations for pattern matches
Circular inlining detection and prevention.
Merge pull request #837 from sjrd/prevent-circular-inlining

Circular inlining detection and prevention.
Patch generated local vars as vals if they are not mutated.

This is important for optimizations to be able to kick in with
enough accuracy. There are typically 2 kinds of such local vars
that are handled by this:
* ParamDefs of tail recursive methods
* Variables captured by lambdas or inner classes, and thus
  transformed to instances of IntRef/ObjectRef/etc. by
  lambdalift.
(not to mention vars declared by the programmer that they don't
mutate.)
Merge pull request #836 from sjrd/refine-vars-as-vals

Patch generated local vars as vals if they are not mutated.
Add support for passing LocalDefs through chains.

So that it becomes possible to inline a closure used two
levels of inlining (or more) from where it is declared.