Fix JsNamespaceChooser bug

JsNamespaceChooser was setting the namespace on names that
aren't actually globals. This didn't matter for Super Dev Mode,
but if another compiler pass coming later creates a new name
reference, the reference will be wrong. (In particular, emulated
stack traces were broken.)

To avoid this, find globals by searching for top-level
initializers instead of by looping through the global scope.

Change-Id: Id1f784b2f5da8b6163790014c279ed9633026ab1
Review-Link: https://gwt-review.googlesource.com/#/c/6515/
Updates module property and resource loading for libraries.

Changed Precompile to not throw an assertion exception during library
compiles that don't have an entry point.

Added differentiation for binding and configuration property definitions
and values that are defined by the current target library versus defined
in the dependency tree. Used this differentiation to save a record of
these values in the current libraryWriter.

Added module parsing support for a <resource> tag as an alternative to the
<source> tag for when needing to pull in build resources (PNG and CSS) and
not wanting to also pull in the java source. This makes it possible to fix
some of the accidental overlapping source inclusion in modules within the
User.gwt.xml cluster.

Patched the module loading process to pipe seen build and public resources
into the current libraryWriter.

Extended the moduleURL resolution system (depends on ResourceLoader) to
also find modules within the supplied libraryGroup.

Turned off BinaryTypeReferenceRestrictionsChecker when compiling libraries
(some of the resolved references *will* be to bytecode from dependency
libraries).

Patched CompilationState's assimilateUnits() process to store validated
compilation units in the libraryWriter.

Added assertions to ensure consistency of path structure when initializing
ZipFileResource (so that its getLocation() result will always be a valid
URL), and fixed two nonstandard uses.

Change-Id: I5efdbccd80df58657c958037e17600e8c381c28e
Review-Link: https://gwt-review.googlesource.com/#/c/6540/
Verifies CompilationUnit.getTypes() round trips in libraries.

Also improves CompilationUnitArchive tests with the save verification.

Change-Id: Ifac1908b7ede9f92fc5ef810659f8c64bb487ba1
Merge remote-tracking branch 'upstream/master'