(PUP-2693) Fix length calculation for sq-string

The calculation of string length was done wrong for dingle
quoted string resulting in negative lengths.
(PUP-2807) Add output of containing scope for log functions

The log functions in 3x outputs th name of the containing scope
(for notice etc.). The reimplemented methods for the 4x function API
did not include this behavior.

Now, the calling scope is passed to the Logging utility to be output
the same way as for 3x.
(PUP-2432) Simplify spec_helper in module skeleton
(PUP-2752) Fix for invalid semvers

Prior to this commit the module tool would fail to perform any actions if any
module found in the modulepath had an invalid semver.
This commit warns about invalid semvers in installed modules, sets the version to
0.0.0, and moves on. This allows the module tool to continue to work, even with the
invalid semver found in the path. This commit also adds some rudimentary tests
for the Puppet::ModuleTool::InstalledModules class.
(PUP-2878) file conflict upgrading from 2.7.26 to 3.6.2

Currently, upgrades from 2.7.26 to 3.6.2 break because of a file
conflict. It seems that as of Puppet 3.3.0, the manpages changed from
being owned by the puppet package, to being owned by the puppet-common
package. This change was initially done to allow upgrades from Debian
packages to ours. However, changing which package owns a given file
makes upgrades difficult. This commit adds in conflicts to allow smooth
upgrades from puppet packages prior to the manpage change to the current
version.
(PUP-2521) Remove windows-pr

 - Windows::Error no longer exists and the ERROR_FILE_NOT_FOUND
   constant is part of the Puppet codebase now.
 - Catch appropriate error in package specs
 - Remove windows-pr, win32-api and windows-api from gemspec
(PUP-2886) Add validation for reserved type names

Before this it was possible to name classes and defines with
words that are reserved by the type system (e.g. 'integer'), while
the name is not a type (Integer is a type, but integer is not), the
definitions will automatically create a resource type named with
an upper case initial letter, and will thus be difficult to reference.

For that reason it is better to error on these names statically.
(PUP-2891) Treat override of class as an error.

This makes an attempt to override a class parameter issue an
error from the runtime layer rather than expecting the underlying
3x implementation to do it when the left expression does not
result in a resource, or a resource that has 'class' as resource type.
(PUP-2881) Move win32-taskscheduler gem into repo

 - Remove win32-taskscheduler from gemspec through project_data.yaml
 - Update require statements where appropriate
 - All specs verified
(PUP-2881) Bump internal win32-taskscheduler ver
(PUP-2881) Remove taskscheduler's Windows::Process

 - Don't mixin windows-pr code any longer, instead rely on Puppet
   defined constants
(PUP-2881) Remove taskscheduler's Windows::Error

 - Don't mixin windows-pr code for error handling.
 - Rely on Puppet::Util::Windows::Error which is error code aware
 - Update error messages to be standardized, always mention HRESULT
   where applicable
 - Remove unreachable error message code (redundant pITask.nil? check)
(PUP-2881) Remove taskscheduler's Windows::Unicode

 - Use read_arbitrary_wide_string_up_to helper on FFI::Pointer to read
   wide strings from pointers instead of using windows/unicode
 - Use wide_string helper from Puppet::Util::Windows::String instead of
   multi_to_wide helper from windows/unicode
 - Ensure that we don't error trying to read strings from empty pointers
(PUP-2881) Add FFI require to taskscheduler
(PUP-2881) Replace taskscheduler's COM with FFI

 - Remove Windows::COM definitions found in windows-pr from the
   taskscheduler code.
 - FFI calls to CoInitialize, CoUninitialize, CoCreateInstance,
   CoTaskMemFree
 - With calls to CoTaskMemFree made as FFI calls, pass pointer instead
   of it's address
 - Add new HRESULT and LPUNKNOWN definition to api_types
 - NOTE: FFI::MemoryPointer.from_string appends an extra NULL byte to
   the GUID values, allocating 17 bytes instead of 16, which is OK here
   as the underlying API call to CoCreateInstance ignores the stray byte
(PUP-2885) Remove timeout around entire plugin sync operation

This removes the timeout around the entire plugin sync. With the
default setting of configtimeout to 2min, this means that the entire
sync must be performed within this time. This conflicts with the
individual timeouts for connecting and reading and may cause that a
perfectly valid operation is timed out in the middle of productive work.
(PUP-2885) Change find_all to each

There is no need to make a find_all() call here since we are not doing
anything with the results. Results are added manually into the
previously declared array 'files' instead. Changing the find_all() to
each() to make it a little more clear.
(PUP-2732) Use less restrictive exec user validation

Without this patch Puppet agent validates the user attribute of exec resource that way, that it's fully unsupported if running without root user. Doing so, the following error message is printed and execution aborted:
"Only root can execute commands as other users". This patch ignores a given user to run the exec as if it's the same as the user actually running the Puppet agent process.
See https://tickets.puppetlabs.com/browse/PUP-2732 for more information.
(maint) Add real case for autosign cert generation test

Nate Wolfe noticed what looks like a copy paste error in my original
ssl/puppet_cert_generate_and_autosign.rb test that was repeating the
cert generate with autosign false and dns_alt_names case for the
autosign true and dns_alt_names case. This commit replaces that with
tests using autosign true, which on master with ca fails, and requires
manual signing with --allow-dns-alt-names flag.
Merge pull request #2853 from hlindberg/PUP-2885_dueling-timeouts

(PUP-2885) Remove timeout around entire plugin sync operation