(PUP-1278) Windows Puppet Agent Service gracefully terminates after succesfully being put into a Paused state

Removed redundant return statement
Added in logic to only start the Puppet Agent if the service is in a Running or Idle state
(PUP-576) Handle Ruby 2.0 OpenSSL lib error message

The error message returned by Ruby's OpenSSL library when the host name
does not match the server certificate changes between 1.8, 1.9 and 2.x.
We handle this message and re-wrap it in a more informative form, but
were failing to catch the 2.x variation.

1.8: 'hostname was not match with the server certificate'
1.9: "hostname does not match the server certificate"
2.x: "hostname \"#{hostname}\" does not match the server certificate"

(2.0 and 2.1 as of the time of this commit)

This change just alters the regex to catch all three variants.
(PUP-576,PUP-1064) Update to activerecord 3.2.x to work around a Ruby 2.x issue

tests/store_configs/enc_provides_node_when_storeconfigs_enabled.rb fails
running under Ruby 2.0 because of a bug between activerecord 3.0 and
Ruby 2.0.  This fails with:

  'undefined method `insert_record' for <Array:0x00000003027be8>'

when Puppet::Rails::Host attempts to save with merged facts.  The root
cause is tangled up in ActiveRecord's association proxies.

ActiveRecord 3.2 has patches which allow it to work under Ruby 2.0

However making this change unearthed another Rails issue which Andrew
Parker recalled was in fact PUP-1064.  This issue tracks a
general failure in Puppet on any Ruby version working with ActiveRecord
> 3.0.10.  Fortunately there was a patch attached to PUP-1064 which
guards lookup of the activerecord id property on the
puppet/rails/resource.rb activerecord object, and this does appear to
fix the issue.
(PUP-1118) Convert environment for nodes on load

The environment for a Puppet::Node instance is turned into simply the
name of the environment when the Puppet::Node is serialized. Since we
then load the Puppet::Node back in using YAML, and YAML uses the magic
of type annotations to re-create the Puppet::Node instance, the
environment that ends up being set on the Puppet::Node instance isn't
an instance of Puppet::Node::Environment, but is a String.

Since the Puppet::Node doesn't get a callback during deserialization, we
added a fixup method to the Puppet::Indirector::YAML implementation so
that the node object can be fixed up before being handed out to the big,
bad world.

The other choice was to use safe_yaml to load the file and then do the
conversion, but safe_yaml is significantly slower than just plain yaml
and we decided to avoid the performance hit.
(PUP-1278) Updating Windows service event messages.

Changing the service startup message to not include the agent
parameters.  This will now only be printed when actually doing the agent
run.

Removing the "service running" message from the loop as this prints out
repeatedly even if the service is paused.

Moving determining the path to puppet to outside the run loop.
Merge branch 'pr/2301'

* pr/2301:
  (PUP-1278) Updating Windows service event messages.
  (PUP-1278) Windows Puppet Agent Service gracefully terminates after succesfully being put into a Paused state

This closes GH-2301.
Merge pull request #2313 from jpartlow/issue/master/pup-576-add-fedora19-host-to-acceptance

Issue/master/pup 576 add fedora19 host to acceptance
Merge branch 'master' of https://github.com/puppetlabs/puppet