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.
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.ToolShedRepository with new galaxy.model.tool_shed_install path.
Models: Introduce app.install_model.

All references to galaxy.model.tool_shed_install models should go through this instance. Right now it is a reference to the same ModelMapping instance, but the goal is to allow them to be two different mappings.
Models: Fix functional tests for ModelMapping introduction.
Models: Allow core Galaxy models and install tool dependencies to target different databases.

Now app.model and app.install_model may be two distinct objects not just two references to the same object. Add ModelMapping class for galaxy.model.tool_shed_install.

If install_database_connection is set in Galaxy configuration, a separate database will be targetted for the persistence of the tool shed repository information. Additional database options may likewise be specified in this case: install_database_engine_option_pool_size, etc....

TODO: Seems to work when model and install_model reference the same object. Specify install_database_connection and then trying to use the tool shed yields some more occurrences where app.model is being referenced instead of app.install_model.