Add the commands to install OSX.
(QENG-608) Check_for_package method should not use which command

- properly differentiate between packages and commands
- check_for_package updated to check for the given package name using
  the correct package manager per OS
- added check_for_command, which uses 'which' to determine if a command
  is currently available
- added spec test coverage for check_for_package
fixup merge conflicts
Get OSX installation working for realz

Previously we were using the passed in version for the versions of puppet
and its dependencies. This adds :facter_version and a :hiera_version keys
so that we can install those dependencies explicitly on platforms that we
must. It also adds the `-pkg` opt to the installer command to work on
newer OSXs.

Signed-off-by: Justin Stoller <justin@puppetlabs.com>
Provide default gem installation

This allows the `install_puppet` command to accept an additional parameter
`:default_action` which, if set to 'gem_install' will attempt to install
puppet from gem if it cannot otherwise install puppet. The default for
:default_action is still to fail hard.
Use specified versions if possible

Previously we allowed passing :version, :facter_version, and/or
:hiera_version to `install_puppet` but only respected `:version` with
windows and osx, and the others only on osx. This will attempt to
install the versions specified for any package specified. The version
information is still optional on linux machines, and there is no way for
us to respect the dependency versions on windows (since our windows
package is an omnibus package).
update documentation
This fixes small bugs within the install_puppet method
Fixup windows support for FOSS

Previously the PATH for windows was only being set to include executables
from git repos, not executables installed from native packages. This
includes the default installation path for native windows packages in the
FOSS command creation.
fixup test
add tests for new install_puppet functionality
Refactor `puppet_install`

This changes the `puppet_install` function to be more readable and reduce
code duplication. It does not change any behavior.
(QENG-438) Pass feature flags to all instances of `apply_manifest_on`

Prior to this there was a number of configurable options that would
tweak Puppet's behavior when using apply_manifest_on. However there
was no good way of setting all instances of apply_manifest_on to use
a certain set of flags. e.g. set "future" parser to be true for a specific
run of suite without changing all of the tests to explicitly set the
future parser option on apply_manifest_on. This allows users to set default
flags to be passed to puppet when apply_manifest_on is called in the host
file, or in a pre-test step.

Example Host file:
  HOSTS:
    master:
      roles: [ 'master', 'agent' ]
      default_apply_opts:
        parser: future

Example BeakerRSpec spec_helper.rb
  hosts.each do |host|
    host[:default_apply_opts] ||= {}
    host[:default_apply_opts].merge!( :parser => 'future' ) if ENV['FUTURE_PARSER'] == 'true'
  end
OptionsHash is already indifferent
Improve documentation for Open Source installation methods
Merge pull request #262 from justinstoller/feature/master/QENG-438-feature_flags

(QENG-438) Pass feature flags to all instances of `apply_manifest_on`
refactor copy_root_module_to copy_module_to, also changed the behavior of puppet_module_install_on to use the PMT tool instead of copying the whole file to it
Fixed test cases and bug with copy_module_to
Merge pull request #299 from justinstoller/update-to-install_puppet

(QENG-{768,769,771}) Update to `install puppet`
(QENG-64) Fix ordering issue when deploying the frictionless agent

Previously, the puppet agent was not stopped on the master until all
nodes were deployed. This could cause a situation where the background
agent would be running when we attempt to deploy the frictionless
repo. In this situation, the agent run we kick off to deploy the repo
would fail. This causes the entire beaker process to bail.

We now stop the background agent immediately, preventing this
condition from occuring.