Use a JS "macro" ScalaJS.extend() to reduce uncompressed size.

When defining a class in JavaScript, we want to write

ScalaJS.c.pack_Class = function() {
  ...
};
ScalaJS.c.pack_Class.prototype = new ScalaJS.inheritable.java_lang_Object();
ScalaJS.c.pack_Class.prototype.someMethod__V = function() {
  ...
};
ScalaJS.c.pack_Class.prototype.otherMethod__I__I = function(x) {
  return x + 1;
};
...

We have to write it this way so that Closure understands that the
methods are indeed methods of the class. But this incurs a lot of
repetition in the uncompressed code.

The solution to make both parties happy, implemented in this commit,
is to define a sort of "macro" in JavaScript. It is defined as

ScalaJS.extend = function(dest, source) {
  for (var prop in source)
    if (source.hasOwnProperty(prop))
      dest[prop] = source[prop];
};

and allows to rewrite the above as

ScalaJS.extend(ScalaJS.c.pack_Class.prototype, {
  someMethod__V: function() {
    ...
  },
  otherMethod__I__I: function(x) {
    return x + 1;
  }
});

In order not to trade this against good optimizations by Closure,
we add a custom pass to Closure. This pass recognizes the "macro"
ScalaJS.extend(), and expands it at compile time, before
optimizations are applied to the code. This allows us to have the
best of both worlds: shorter dev version, and a maximum of
optimizations in the opt version.

This opens an avenue for other similar macros: definitions for
ScalaJS.{is,as,isArrayOf,asArrayOf}, for example, could be
macro-ified in the same way.