Rest API sorts locations by name
Adds HasId and HasName marker interfaces for Rest API domain objects

Simplifies sorting of summary objects by name/id
Reworks jsgui catalogue page to display app/entity info

Breaks deletion of locations
Adds /v1/catalog/applications/id to Rest API

Just calls equivalent for /v1/catalog/entities/id. Makes jsgui logic
much simpler.
Further improvements to jsgui catalog page

* Displays as much as possible of catalogue item when selected, then
  refreshes model and only updates display if model contents change.
* Can delete models if button with class delete is clicked.
* Improved presentation of errors loading models
* Removes add-new-thing catalog button, to return later
Merge remote-tracking branch 'upstream/master' into feature/jsgui-catalog

Conflicts:
	usage/jsgui/src/main/webapp/assets/js/view/catalog-details-location.js
	usage/jsgui/src/main/webapp/assets/tpl/catalog/details-location.html
	usage/jsgui/src/main/webapp/assets/tpl/catalog/nav-entry.html
Add Apache license header to new source files
Fix failing tests on Windows

  * brooklyn.util.ResourceUtilsTest.testGetResourceViaClasspathWithoutPrefix() fails on windows paths when OSGi is used
  * Explicitly wait for osgi framework shutdown before deleting the cache folder so all files are unlocked
Fix for test LocationUsageTrackingTest.testUsageIncludesStartAndStopEvents

It is possible to create the event in the same ms as the stopwatch:
java.lang.AssertionError: date=1404984334453; pre=1404984334448; post=1404984334453 expected [true] but found [false]

Just include the start and stop times in the allowed range. Also display the time in ms so the problem is visible.
Merge remote-tracking branch 'upstream/master' into feature/jsgui-catalog

Conflicts:
	usage/rest-server/src/main/java/brooklyn/rest/resources/CatalogResource.java
Fix randomly failing test.

The test was depending on preserving the order of elements in non-preserving
collection implementation (set over the keys of live map). When the instantiated
entities have the same creation time there isn't determinism in picking one of them.
Make the test non-dependant on the insertion order.
Fix occasionally failing temporary file and folder creation.

The previous implementation wasn't deterministic, instead counting
on the statistical improbability of generating an existing file/folder name.
This coupled with the fact that the random generator is weak (repeats
id within 2000 attempts) made it likely to generate an existing name,
leading to unexpected exception.

The solution is to use the Java provided functionality where possible
and retry until success otherwise.
Fix occasionally failing tests - relaying on non-guaranteed time delays.

The code relies on having at least 1ms between the separate test steps
which is non-guaranteed. Include artificial slowdown steps to guarantee
1ms intervals. The concrete problem is that the API doesn't accept
times in the future, while the test wants to check the state 1ms post-event.
This closes #51
changing the tags on an entity should trigger persistence
make server pool test wait for membership to catch up before making assertions, as resize happens in bg (whereas start is immediate)
Address comments in PR #61
  Fix occasionally failing test, check for start and stop times inclusively.
trim string value before transform it in a primitive
Move catalog YAML test from rest-server to brooklyn-camp.

The test doesn't rely on REST in any way.