Method for finding the correct application model.

This method first checks to see if an application configuration is
defined, then gets the correct ApplicationModel. Reverts to
ActiveRecord::Base if it can't find anything.