fix #46 add padding after prefix in String.format
add SIZE constants to number companions
fix #48 correctly convert negative numbers with x conversion
Merge pull request #49 from gzm0/string.format

Fix diverse issues with String.format (#46, #48)
Improvement on the translation for pattern matching.

Both in terms of simplicity of the compiler code and in size
and simplicity of the emitted code.

It builds on generalizing the js.LabeledStat AST node, which was
valid only in statement position, as js.Labeled which is also
valid in expression position. The result of a Labeled expression
  a: { <body> }
is its body, unless evaluation of the body hits a
  return(a) <expr>
in which case it is the returned expression. Such a return is
represented as a js.Return(expr, Some(js.Ident("a"))). It is
considered a return rather than a break because they share more
semantics with return than break. This makes perfect sense if
you consider the labeled expression as a call to a function
that has been inlined.

With this new JS AST node, pattern maching translation does not
have to deal with 1) creating a temporary variable for the result,
and 2) distinguishing between Unit and non-Unit cases. Instead,
it can simply wrap the cases in a labeled expression, and jumps
to the matchEnd label ared translated as simple labeled returns.

JSDesugaring takes care of desugaring these into labeled
statements and labeled breaks. It can do a better job at
minimizing emitted code with this structure, because it can also
consider labeled returns as LHSes that can be pushed into
complex RHSes. But more importantly, because can push outer LHSes
into the labeled expression, often eliminating the need of the
labeled expression altogether when the LHS is a js.Return itself.
This is actually a very common case in Scala code, which happens
every time a match appears in result position of a function. So
we spend a few lines in the compiler optimizing that case to
save a lot of emitted code.
Do not print else branch when it is js.Skip().

This cleans up a bit more the emitted code, especially
code coming from pattern matching.
Make sure js.Block() is always created with 2+ elements.

If applied to 0 element, it becomes js.Skip(). If applied
to 1 element, that element is returned.

This makes sure that trees reaching JSDesugaring are as
unnested as possible. This, in turn, allows it to consider
as many trees as possible as being already simple JavaScript
expressions, which need not be unnested with temporary
variables.
More rational usage of exprToStat() and statToExpr().

This makes sure the js.Block(..., js.Undefined()) that we
create in statToExpr() at various places are eliminated
by exprToStat() for emission in statement position.
Alternative implem for protection of receivers of raw apply.

This is an alternative implementation of the protection
mechanism introduced in 3be49088aaee3ec8d4cdabf3ef286e342febcd2e.

This new mechanism goes through a simple identity function,
instead of going through a local variable. It produces less
code because 1) it is shorter in the first place and 2) it
does not introduce a non-JS-expression where there was none,
and hence the desugaring does not have to extract even more
temporary variables.
Make JSDesugar.unnest() a bit more clever.

To avoid more arguments to be unnested in temporary
variable when possible.
Fix: avoid to create a js.Try wout catch nor finally.
Add implicit conversions from JS primitives to Rich ops.

* js.String -> StringOps
* js.Number -> RichDouble
* js.Boolean -> RichBoolean

This will allow you to use nice things like
`(x: js.Number).max(...)` or `(s: js.String).map(...)`,
which are "available" on `Double`s, `Boolean`s and `String`s
but not on `js.*` by default because implicits don't stack.