Maint: Update docs for schedule type and metaparameter

The wording of these was out of date and somewhat strange.
Maint: Improve/reduce documentation of relationship metaparemeters

These descriptions were too wordy and too inconsistent. I'm imposing a format on
them so they all look alike, and a casual reader can tell how many there are and
how their behaviors differ. I'm also adding links to the more detailed
documentation.
Maint: Standardize docs for refresh behavior in resource types; clarify exec docs

Service/mount/exec already documented that they do the refresh thing, but it
wasn't organized in a predictable way. I'm imposing a convention of a bold
"Refresh" label, a reminder of where events come from, and a description of what
that type does when it gets one.

This commit also adds a lot more detail on how execs respond to refresh, since
it's actually really complicated and not the least bit intuitive. I also reworded
some of the older language near the top of the exec type, while I was in there.
Maint: Clarify docs for stage type and metaparameter

This was pretty disorganized and confusing. Now it's less so!
(packaging) Update PUPPETVERSION to 3.4.2
(PUP-1211) Force registry value encoding to match code page

Ruby uses ANSI versions of Win32 APIs to read values from the registry. The
encoding of these strings depends on the active code page. However, ruby
incorrectly sets the string encoding to US-ASCII.[1]

As a result, if you try to perform a regex match on the string, and the string
contains the registered trademark symbol, 0xAE, then ruby will raise an error
saying 'Invalid byte sequence in US-ASCII'

This commit forces the encoding of REG_SZ, REG_EXPAND_SZ, and REG_MULTI_SZ to
the encoding for the active code page. So if the active code page is 1252, the
ruby encoding will be `Encoding::CP1252`.

See https://bugs.ruby-lang.org/issues/8943
Merge pull request #2229 from joshcooper/issue/stable/PUP-1211-registry-encoding

(PUP-1211) Force registry value encoding to match code page
Merge pull request #2156 from nfagerlund/docs_metaparams_schedule

Docs: Schedule, stage, and other metaparams
(PUP-736) Remove description from RPM/DPKG

Encoding mis-match causes package prefetching to fail with
'invalid byte sequence in US-ASCII'. The guidelines for the
Debian Project [1] and the Fedora Project [2] specify that
metadata files should be UTF-8 encoded, but it is not
enforced.

Since we are not able to force encoding "UTF-8" to work around
this we have decided to back out the description from package
formats for now while working on a longer term solution for
encoding.

Without this fix the package formats fail if there is a package
with UTF-8 encoding in the description.

[1]: http://www.debian.org/doc/debian-policy/ch-controlfields.html
[2]: http://fedoraproject.org/wiki/Packaging:Guidelines#Encoding

Paired with Josh Partlow <joshua.partlow@puppetlabs.com>
(PUP-736) Do not test for package not found

And log unmatched lines at debug level. The executors for dpkg and rpm
will raise an error if the command line returns a non-zero status, which
it does for package not found errors.  This bypasses parsing and is
interpretted as package absent result.  Therefore there is no need to
attempt to parse 'package not found' and we can avoid any issues with
changing or translated messages.

If there are unrecognizable lines of output returned from a successful
execution, log them at debug level.  Logging at a warning level has the
potential to produce too much noise.

Dpkg#query is no longer multi-line output and no longer requires
filtering through a pipe.
Merge pull request #2233 from jpartlow/issue/stable/pup-736-remove-rpm-dpkg-description-fetching

Issue/stable/pup 736 remove rpm dpkg description fetching
Revert "(maint) Add temp workaround for travis"

This reverts commit d58c7f04bb47b8cfce7731e3dc9286a57ee8d352.
(maint) Fix acceptance test for scheduled_task deletion

This test was accidentally checking that the scheduled task was still in
place in the Windows scheduled task list. Because the
Win32::TaskScheduler#delete call seems to be asynchronous, as long as
the test for scheduled task happened fast enough, it was still seen as
present and the test 'passed'.  In fact, puppet resource was scheduling
the task to be removed, and it does get removed.  This test began to fail
when the vms slowed down enough that the broken verification step began
to fail because it was no longer executing fast enough to see the
transient task prior to its deletion completing.

This change corrects the verification step to verify by asserting that
the schtasks.exe list command failed (did not show the deleted task).
And it wraps it in a timeout to allow it a few seconds for the scheduled
tasks state to finalize.
(maint) Correct documentation of each function

The documentation of the each function used deprecated syntax.
PUP-1322 Do not fail hard on unparseable files
Merge pull request #2256 from jpartlow/maint/stable/fix-scheduled-task-delete-acceptance

(maint) Fix acceptance test for scheduled_task deletion
(PUP-1389) Ensure wide strings have double null terminators

It seems that calling String#encode('UTF-16LE') sometimes adds only a single
NULL terminator in both ruby 1.9 and 2.0 on Windows. However, a wide string
is supposed to have two NULL terminators.

For reasons unknown, versions prior to 2012 seem to accept wide strings with
only a single NULL terminator, but in 2012 and 2012R2 the string is often times
contains a non-zero high byte, which causes Windows to read past the single
terminator, and attempt to access a path that does not exist.
(PUP-1389) ReplaceFile to FFI / move wide_string

Puppet::Util::Windows::File.replace_file now calls FFI to
replace files in place on Windows.
Puppet::Util::Windows::File.wide_string has now been moved to
Puppet::Util::Windows::String.wide_string.

This moves wide_string to lib/puppet/ubilt/windows/string.rb,
adds specs concerning different encodings.

In addition, we've removed Windows::API::WideString usages from
everywhere it was found as it is known to cause issues with Windows 2012.
Puppet::Util::Windows::Process.lookup_privilege_value in particular was
changed to use LookupPrivilegeValueA (ANSI) as we control the privilege name
being passed to it.

Paired with Josh Cooper <josh@puppetlabs.com>
(PUP-1389) Simplify logic for appending extra NULL

This commit simplifies the process for appending a NULL terminator to
the wide string.
Merge branch 'pr/2261' into stable

* pr/2261:
  (PUP-1389) Simplify logic for appending extra NULL
  (PUP-1389) ReplaceFile to FFI / move wide_string
  (PUP-1389) Ensure wide strings have double null terminators