fixes #359 - hostname spoofing for unattended installation templates

(cherry picked from commit 5b70f0e0232bff3e580923f485bc0bd1816d9279)
fixes #3920 - prevent 500 ScopedSearch errors on the API, raise UI errors correctly

(cherry picked from commit f9bc5a8e5934aac9bd8d5488f84717d33e359501)
fixes #3925 - create apipie param_groups for API v2 to DRY documentation

(cherry picked from commit 2be84f3d773e74b5cc37841284ec216996fd0b51)
fixes #3826: no more sql errors when trying to search for environments (also domains, operatingsystems, and models)

(cherry picked from commit 145db8634df9fbc3ffb51b80093809c5aecd0f6e)
fixes #4115 - added missing LICENSE file

(cherry picked from commit 41e9d14b228bda3a4c5f0dde5b7221fd3806e890)
fixes #3828 - set language locale for API messages and error responses

(cherry picked from commit 5a864bedb5d9bbbb68788169aa0f0396a312ac16)
fixes #3955 - added param_true? and snippet_if_exist template methods

(cherry picked from commit 3701a8d1c6d698ea8c57321eed2f87c74bd57728)
fixes #4152 - fix syntax error in _form.html.erb for hosts and hostgroups

(cherry picked from commit 378c65e5af8ff131ae1701c78934d6bbd0a055e9)
fixes #3931: rbvmomi gem has been pinned to ~> 1.6.0

(cherry picked from commit de0804f0aa6e9aa61a223fb600a0c97d595695e7)
fixes #4161: plugin ActiveRecord models that do no define 'name' method no longer throw NoMethodError when to_s is called

(cherry picked from commit 12cc808b8b39d9796671b63c5200d4d2e5d3ef79)
Fixes #4032 - Use object.id for comparisons

(cherry picked from commit 409ce13e71b5a23178e109b0fb240fc2e2c6ff94)
fixes #3697, #3701 - more comprehensive field validations

(cherry picked from commit 4bae5cedb8ab562b6c397234c5cb1cfd604fde74)
refs #3697, #3701 - fix test with multiple validation failures

(cherry picked from commit dbaa47b718a25992065cc6e0afea78bed1171f7e)
Release 1.4.0-RC2
fixes #3960 - wrap APIv2 errors in an "error" node

(cherry picked from commit 0f7d219a4a65cd795eecd05117b08511d9025de2)
fixes #2866 - Changing a hostgroup name doesn't update associated Smart Variable matchers

(cherry picked from commit 709ad8d6f425e0817d3faef2cc629af1458cb1c9)
fixes #4188 - api/v2/status incorrectly shows api_version: 1

(cherry picked from commit 36b32e9352b7a9c23dd012efeb83cbc1bf37abdc)
fixes #4186 - db:seed fails when install media exists with same URL

(cherry picked from commit 202770a1d64f6beae3b1b8ba156d86345c061699)
fixes #4189 - Facts charts are not rendered

(cherry picked from commit ccb763a6fdfbd68330599932fdc705d8922be299)
fixes #4005 - ensure standalone Rabl.render works outside of a controller

(cherry picked from commit 858708c466398ac5f42bb1bb0fd6c1e531e31385)