Move creation of knex instance to config module

addresses #2170
Only reference model properties through the models module.
This frees us up to enforce one single point of access, thus paving
the way towards allowing us to initialize the models at are request,
and not when it's require().

addresses #2170
Fix slowdown of tests by reverting back to using knex in test/utils
Move setup to API

closes #3136
- moved setup to authentication API
- added `POST /ghost/api/v0.1/authentication/setup` to execute the
setup process
- added `GET /ghost/api/v0.1/authentication/setup` to check if blog is
already set up (needed for #3145)
- removed unused methods from api/users.js
Merge pull request #3243 from sebgie/issue#3136

Move setup to API
Merge pull request #3213 from hswolff/lazy-load-models

Preparation for lazy loading of models
Use bookshelf's model registry plugin

Refs #2170

This removes the circular dependency problem from our models
- add the registry plugin
- switch all models and collections to be registered
- switch relationships to be defined using a string, which calls from the registry
Upgrading bookshelf to 0.7.6 & knex to 0.6.21
Migration improvements

refs #2600

- fixed issue with defaults not being populated on upgrade
- added logging to all actions in the migration process to help debugging
  in future
Separating fixtures from logic
Split permissions fixtures from other fixtures
Removing references to ids

- try to make migrations more robust by fetching the objects we've added, rather than relying on ids
- user isn't needed for adding
- changed owner fixture slightly to remove any confusion between the 'Owner' role and 'Ghost Owner' user.
003 fixture versions managed in logic
Refactored permissions fixtures to make them easier to read

refs #2600

Note: requires the new model registry in order to work

- refactored json file
- added checks to migrations so they aren't duplicated
- made some of the code easier to read
Refactoring permissions_roles into fixtures