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)