fixes #2324 Refactoring of Host STI

Allows plugins to render a different STI-type edit form and save
the changed type. Also allows the /fact_values upload to specify
a type. Adds tests for the STI type changes.
fixes #2323 syntax error in host_mailer
fixes #2322 ActiveModel::MassAssignmentSecurity::Error: Can't mass-assign protected attributes:
fixes #2319 make HostClass and HostgroupClass unique puppetclass_id by scope
fixes #2318 - API v2 documentation for parameters to include real paths rather than /references/:id
fixes #2250 API v2 add/remove puppetclasses from hosts and hostgroups
rails 3.2
fixed spice-html5 loading.
fixed migration deprecated constant
removed a malicious fixture that broke all my test.
prevent inner-select because it brakes on mysql.
in rails3.1 active record uses inner select where previuos versions
prefered two queries.
Because mysql does not support limit in inner select, I am forcing two
queries.
latest scoped_search
fixed db:migrate on pg
fixed merge
fixed several issues with Host STI on rails3.2