jsgui: Fix case when entity details don't load

Handles case when application-tree hasn't rendered a details view when
the page is first loaded. Also includes a few basic code improvements in
application-tree.js.
jsgui: Display an explanatory message if entity in URL is unknown
Replace Utils.log with safe console.log and global log method

* console API methods stubbed for safe invocation when console is
  unavailable
* Util.log deleted.
* `log` method on window object available, calls console.log and preserves
  line numbers.
Align summary tab contents with other application tabs
Display 'unknown entity' message when loading details fails.

Use a promise to simplify code dependent on app and entity loading.
Trivial MongoDB server tidies
Move ApiError classes in accordance with REST api/client split

Concurrent pull requests raced.
jsgui: Pass reset: true to collection fetches.

Fixes a few refresh-related problems. The behaviour changed in Backbone
v1.0. I should have picked it up when I updated the library.
Namespace application tree refresh to avoid refreshing everything else

Event was bound to .refresh class, which is used by all the sub-views
with data tables.
Merge pull request #816 from sjcorbett/backlog

jsgui: Handle unknown entities in URL when first loading page