Make `packageJS` fast again.

packageJS is now decomposed in three subtasks:
packageExternalDepsJS, packageInternalDepsJS and
packageExportedProductsJS. They each package a
component of the classpath: the external dependencies,
the internal dependencies, and the products of the
project, respectively. The results are stored in three
separate .js files.

The result is that when the project code changes, but
not its dependencies, only the last set of .js files
has to be repackaged, which is *way* faster!
Also, if only internal dependencies change, then only
the two last .js files must be repackaged. This is
a little bit slower but only marginally so.

Packaging the external dependencies still takes a lot
of time, but that has to be done only when external
dependencies change, which is very rare.