(PUP-2987) Windows service runinterval parsing

 - Refactor parsing code to a separate method to cleanup run loop
(PUP-1527) After upgrade from 3.3.2-1 to 3.4.2-1 naginator fails to
create config from exported resources taken from hiera

Some changes introduced in hiera around 3.4 resulted in type coersion
from strings to FixNums when creating exported resources that were
partially built from hiera data.

This patch ensures that any non-array parameter passed through the
Nagios::Base.to_s is actually a string before trying to run the .sub
method on it, and so fixes the above error with exported resources
whilst also introducing support for fixnum params for any of the nagios
type parameters
(PUP-2631) Elide long URIs for 404 message

When the agent encounters a 404 response from the master and it has been
told to fail on 404, it previously output the entire path plus query
string that it requested. However, the most common case where this
occurs is when requesting a catalog, which can have a very long query
string if the request was done with a GET. This does not always occur
because even longer query strings will result in the agent using a POST
instead of a GET, which causes the long query string output problem to
go away.

In order to fix this the query string is now elided to 100 characters
(97 characters of the original text plus 3 periods).  In order to still
be able to debug any problems that might result from the query, however,
the query string is *not* elided if the log level is `debug`.
(PUP-2987) Restructure Windows service code

 - Move runinterval parsing and execution of the puppet agent to a new
   thread that maintains a busyloop until either:
    - the service is no longer running
    - an exception has occurred with parsing the runinterval
 - Rather than performing a wakeup against the main thread, simply kill
   this new thread on service_stop
 - Main service code will wait until the busyloop thread dies, then will
   exit
 - Note that this change is ultimately not responsible for the service
   hangs experienced in the service.  Additional changes have been made
   to the win32-service gem to ensure events being waited on with
   WaitForSingleObject are always signaled properly, even in failure
   cases.  Please see merged PR for more info:
   https://github.com/djberg96/win32-service/pull/21
   https://github.com/puppetlabs/puppet-win32-ruby/pull/51
(PUP-1044) Make FileBucket::File use a local file whenever possible
(PUP 229) Fix /etc/shadow parsing so that max/min_age is reported correctly

Before this patch, parsing /etc/shadow, when empty trailing fields were
present, they were discarded, and inturn a nil check was used to ensure that
the fields did not exist. However, this ran into trouble when a value was
appended to the end, causing all the empty fields to be returned as empty
strings instead, failing the nil checks.

This patch ensures that all empty fields are returned as empty strings, and
a check for empty string is used to check whether the field exists or not.
Merge pull request #2975 from vrthra/fix/pup229/maxage

(PUP 229) Fix /etc/shadow parsing so that max/min_age is reported correctly
Changing don't to does not because grammar
Merge pull request #2933 from rdark/fix/master/pup1527

(PUP-1527) After upgrade from 3.3.2-1 to 3.4.2-1 naginator fails to crea...
(PUP-2924) Initialize resources from Type classes

This patch extends the signature of `Puppet::Resource#initialize` to accept
subclasses of `Puppet::Type` as arguments. This allows `resource_type` to be
set during initialzation for some cases and eliminates a later, costly, call to
`environment.known_resource_types`.
(PUP-2349) Treat mode strings as octal

Previously there was logic to convert incoming mode using to_i,
but if it were a String that would convert the string as decimal,
whereas mode is always specified as octal. I don't know why the
to_i conversion was in there and whether it ever worked in a
meaningful way.

So fix this to convert Strings as octal.
(PUP-2349) Specify mode as a string containing an octal mode

Previously, mode was specified in some places as a Fixnum, in others
as a String. Consistently specify mode as a string containing octal.
(PUP-2349) Add deprecation warning for non-string mode property values

The 'future' (4.x) parser treats literal numbers as actual numbers instead of
strings as the 3.x parser did. This makes file resources that use unquoted
mode values behave strangely (see PUP-2156) so we are deprecating non-String
values for mode.

So this change adds a deprecation warning for non-String values of mode
when running with --parser future.
(PE-4848,PUP-2999) Modified test to use puppet_tmpdir
(PE-4848,PUP-2999) Fix tempdir perms for two tests
(PE-4848,PUP-2999) Disable expected failures
(PE-4848,PUP-2999) Disable expected failure
(PE-4848,PUP-2999) Change confines to skips
(PE-4848,PUP-2999) Don't run apache external test on jvm
(PE-4848,PUP-2999) Disable test for JVM Puppet