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