Clean up database scripts (create_db.py,db_shell.py,manage_db.py).

Move duplicated code into lib/galaxy/model/orm/scripts.py - add unit tests. PEP-8 clean up of all 4 files. Add incoherent incoherent comment at top of manage_db.py.

As a result of the code de-duplication create_db.py should be usable with the tool shed now.

Will be refactoring lib/galaxy/model/orm/scripts.py to work with new tool shed install database - it will be good to have a place to test these and allow manage_db.py and clean_db.py to work immediately.
Models: Refactor some common code between tool shed and Galaxy into galaxy.model.orm.
Models: Refactor common code out between Galaxy and Tool Shed related to create_engine.
Models: Introduce real class for app.model (ModelMapping).

Shared across Tool Shed and Galaxy to reduce code duplication. Previously this was just a bunch, making it a real class allows placing some shared logic in there.

This refactoring also eliminates some global variables galaxy.model.mapping.Session, galaxy.model.mapping.context, and same for tool shed. This may break things, but these are things that should probably be fixed anyway.

In particular small changes to db_shell.py and a unit test that depended on these global variables have been updated. The functional test frameworks likewise needed to be updated to not depend on these - these changes were more substantial.

To fix these functional tests, I essentially replace old references to global variables in Galaxy with references to global variables just defined in the test framework in test/functional/database_contexts.py (a slight improvement).
Models: Random fixes for mapping tests.

PEP-8. Get rid of old test suite code mixed into real code.
Models: Unify 'now' import and comment across galaxy and toolshed.
Models: Move tool shed install related models and mapping into own package.

Specifically, refactor all tool shed installation related models and mapping information in Galaxy's models into new module galaxy.model.tool_shed_install.

This is work toward being able to store tool shed installation data into a second database. There is still a lot TODO, all access to these models are still through galaxy.model and the existing ModelMapping object, these references need to be refactored.

More information on the end goal here: http://dev.list.galaxyproject.org/Galaxy-less-Tool-Installing-tp4660655.html.
Models: Update references galaxy.model.ToolShedRepository.

Replace references to galaxy.model.Tool{ShedRepository,Dependency} with new galaxy.model.tool_shed_install path.