fixes #2685 incorrect and inefficient regexp checking medium name format

It takes eternity to compute something like this:

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa  b" =~ /\A(\S+\s?)+\Z

Also "this is wrong " was not matched
fixes #2484 - host, hostgroup, and BMC passwords were overwritten as blank
fixes #2489 - fixes BMC password caused by rails bug accepts_nested_attributes_for and serialized child field
fixes #2686 - use setting model's string parser to update values
(cherry picked from commit 5d9073bba52b502b08b8b67b7f546eb4d481e5c1)
Fixes #2655 - Display Host buttons on unmanaged hosts if a puppet proxy exists
fixes #2697 - HostMailer summary is broken
(cherry picked from commit 8e851ef524a3348c1587e53e3c2da616fdbe1fdc)
fixes #2697 again - HostMailer typo and .deliver
fixes #2695: Updated fedora and ubuntu mirror urls
fixes #2690 - undefined method gsub! for nil:NilClass on fact import
fixes #2404 - prevents 404 when updating invalid name used as id
fixes #2701 - require correct minitest file

(cherry picked from commit f604723465b0effc63ee8d1b8b5622f01508ec16)
fixes #2317 - VM's with the name foreman_########