NICTA/nationalmap — pull request #423 by kring (2014-11-03 00:32:45+00:00)
Title: Fix startup/sharing

This is a pull request into the `refactor` branch.

Make sharing work more consistently, without creating giant URLs in most cases. The application now keeps track of a list of `init sources`, which are things like `init_nm_json` that contributed to the catalog, services, camera position, etc. Then, items in the catalog know whether they came from one of these init sources or from some other source, such as drag/drop or Add Data. When sharing, we include the following in the URL:

* The list of init sources.
* The complete definition of any catalog items that came from anywhere other than an init source.
* (effectively) the list of catalog items, no matter their source, for which `isEnabled` or `isOpened` is true.

The end result is that the only time share URLs get really big is when you drag/drop data (including init files) onto the map, because then everything needs to be embedded in the URL. Otherwise, the URL basically just encodes something like "we initialized from `init_nm.json` and `init_vic.json`, and these items are enabled.

Another change worth mentioning is that `config.json` now _only_ includes the list of `proxyDomains`. The list of `corsDomains` and the initial camera position have been moved to `init_nm.json` (and similar files).