STI for Host - for Rails 3.2

This branch is a refactoring of @GregSutcliffe 's branch #415 and isbased on the Rails 3.2 branch pr #415

I tried to simplify the changes.  Only refer to the last 2 commits.