jsgui: Handle unknown entities in URL when first loading page

Should fix empty details view on applications tab (backlog item #3).

This occurred when the entity ID in the URL didn't match any of the entities in the application tree (e.g. a new application was started but the address bar didn't change).

Also makes using `console` methods safe and exposes a `log` method on the window object that calls `console.log`.