Allow editing documents from view

Closes COUCHDB-2494
basic concept working
Centralise more of the docs and database
refactoring routes for typeahead
for sharedDBs, add views
add permissions urls
fixed delete_database_modal missing database variable