Dialog routing

This fixes issue #425, preventing multiple modal-backdrops from appearing.  This is done by making sure dialogs are fully dismissed before showing a new dialog or when navigating to somewhere without a dialog.

This also fixes issue #253.  Login and register dialogs can be bookmarked, but won't be in the navigation history (unless you put it in manually).

This helps with issue #154.  All group, user, folder, collection, and item dialog routes should go where expected.  This doesn't fix routing for file uploads, edits, or assetstore edits.  Generally, these latter elements can have multiple entries per webpage, so there isn't a distinct routing.  Either we should remove the ?dialog= from these dialogs, or add a ?dialog=(action)&dialogid=(id) instead.

The routing could use more testing.
The purist in me wants a utility function for this, but these *should* be the only place we actually need this.