(QENG-758) add ability to select a group a beaker hosts based upon...

...a set of properties

- a shortcut means of selecting a sub group of hosts to run commands on
(QENG-6) Beaker DSL `scp_*` commands print the options hash as if...

... it were executed on the command line
- simply remove the option hash from the debug line, it isn't
  appropriate there.
(QENG-912) Beaker 1.14 breaks PE Puppet Acceptance

- was too conservative in removing non utf-8 compliant characters -
  ended up removing compliant characters along with undef/invalid
  character codes
- tested locally and it preserved messages like:
/etc/puppet/modules
├── jimmy-appleseed (v1.1.0)
├── jimmy-crakorn (v0.4.0)
└── jimmy-thelock (v1.0.0)
- correctly removed actual undef/invalid characters so that string
  methods can be run (ie, split, gsub)
Merge pull request #354 from anodelman/scp-repair

(QENG-6) Beaker DSL `scp_*` commands print the options hash as if...
Merge pull request #356 from anodelman/utf-8-encoding

(QENG-912) Beaker 1.14 breaks PE Puppet Acceptance
(QENG-923) Ensure @codename is set if platform string has codename

Beaker 1.14.0 and up has a change to Beaker::Platform which ensures that
@version and @codename is set if the platform string contains the
version number, and that @version is set if platform string contains the
codename, but it fails to set the @codename in this later case.

Puppet currently has debian/ubuntu configs checked (used in ci) which
use platform strings of the form debian-wheezy-x86_64. We could change
these, but it looks like the intention of the Beaker::Platform object is
to provide @version and @codename (where codenames are used).

This patch ensures that @codename is set along with @version in these
cases.
(QENG-924) Fix Beaker::DSL::EZBakeUtils.conditionally_clone

Fetch from origin then checkout the origin HEAD.

Signed-off-by: Wayne <wayne@puppetlabs.com>
Merge pull request #357 from jpartlow/issue/master/qeng-923-ensure-platform-codename

(QENG-923) Ensure @codename is set if platform string has codename
Merge pull request #358 from waynr/bugfix/ezbake-utils

(QENG-924) Fix Beaker::DSL::EZBakeUtils.conditionally_clone
(QENG-927) Beaker does not honor --fail-mode always fails fast

- bug comes from regex comparison with a symbol not being coerced to a
  string in ruby 1.8, simple adding a 'to_s' resolves this
(QENG-188) Allow foss runs to use service scripts

Prior to this commit, any run of beaker with a non-pe master that
attempted to stand up a master with a particular configuration in order
to test against it using the with_puppet_running_on() helper would
always stand up a webrick master by executing `puppet master <args>` and
then later stop it with `kill`.

The platform team needs to be able to run acceptance suites in which the
puppetmaster is started/stopped using package provided init scripts, or
by restarting apache if a passenger puppetmaster package is installed.

This PR makes a few additions to OptionsHash, Host and the DSL::Helpers
to allow us to distinguish foss hosts which were spun up from source
from those which were installed from packages.  And if we are working
with packages, whether we will be attempting to restart a running
service or stop/start using service scripts.
Merge pull request #360 from anodelman/fail-slow

(QENG-927) Beaker does not honor --fail-mode always fails fast
Merge pull request #359 from jpartlow/issue/master/qeng-188-foss-service-restarts

(QENG-188) Allow foss runs to use service scripts
Revert "(QENG-188) Allow foss runs to use service scripts"
Merge pull request #363 from puppetlabs/revert-359-issue/master/qeng-188-foss-service-restarts

Revert "(QENG-188) Allow foss runs to use service scripts"
(GEM) version bump for beaker 1.16.0
Merge pull request #364 from anodelman/make-gem

(GEM) version bump for beaker 1.16.0
(HISTORY) update history for release of beaker 1.16.0 gem
Merge pull request #366 from anodelman/make-gem

(HISTORY) update history for release of beaker 1.16.0 gem
(QENG-840) Replace puppet.conf after stopping master

A webrick master watches the puppet.conf file and will try to reload and
reapply the settings catalog when it changes. The with_puppet_running_on
method gets into a race with this behavior, plus bug PUP-2834, because
it puts the backed up puppet.conf back into place *before* trying to
shut down the master process. This caused the master to periodically
read the new configuration, fail in applying it, crash, and then beaker
would try to kill the process. The process was already dead and the kill
command ends up failing. This then causes the test to fail.

This changes it so that for webrick masters, the backed up file isn't
moved back into place until *after* the master has been shut down. Since
rack masters don't ever try to reread the config file, this doesn't
affect them. Also, in the rack case, the file needs to be moved into
place *before* the master is stopped since it is actually fully
restarted.