Fix lookup of models from database routers.
Review Request #5169 — Created Dec. 26, 2013 and submitted
Fix lookup of models from database routers.
This fixes lookup of model types from database routers by fetching the
actual model and passing it into the router, rather than passing in a
MockModel.There's a new utility function, get_database_from_model_name, which does
the lookup. It's now used instead of direct router access.
Unit tests pass.