Restructured use of Knex

Restructured the way knex is accessed by using app.set and app.get. Bookshelf needs to be accessed in a similar way.

@ryojiosawa , @jjmerino , @kmeurer , @jamesongamble , @rstellar - Please view and merge if all is well.