(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
(PUP-1282) Express Windows specific gem dependencies

Previously, if a ruby module on windows tried to use puppet as a
library, the calling module had to know about puppet's platform specific
dependencies. This comes up when trying to develop and test puppet
modules on windows.

This commit adds the windows specific gems to project_data.yaml, and
updates the Gemfile to add these dependencies when during
bundle install

The build pipeline will automatically create an x86-mingw32 gem in
addition to the generic one.
(PUP-1389) Embed the extra NULL within the string

Previously, we were appending a NULL to the wide encoded string to work around
a ruby bug fixed in 2.1.

However, we were calling `String#strip`, which makes a copy of the string, and
in the process only preserves the first NULL.

This commit embeds a NULL within the string itself, e.g. "bob\0". Since the
NULL is part of the string data, ruby will preserve it.

Also, `String#+` cannot combine strings with different encodings,
e.g. "a".encode('UTF-16LE') + "\0" results in:

    incompatible character encodings: UTF-16LE and US-ASCII

which is why we need to encode the terminator. The actual message depends on
the default encoding, e.g. US-ASCII, UTF-8.
(PUP-1389) Merge branch 'issue/stable/PUP1389-segfault' into stable
Fixing HTTP API link formatting
Adding link to LICENCE
LICENCE is not a .md
Spelling LICENSE correctly
Updating copyright years in LICENSE
Merge pull request #2273 from highb/master

(doc) Updating README.md, LICENSE
(PUP-1048) Windows puppet service should log to the eventlog

Initial attempt to add in eventlogging for all log messages
New service command line argument (--logtofile). By default the service will log all messages to the Eventlog.  This argument will log messages both to the Eventlog and the Puppet log file in Common Application Data.  This can be useful if the EventLog logging is failing or another application depends on the the logfile
Basic tests show the new code works however more testing should be done
(PUP-1048) Windows puppet service should log to the eventlog

Cleaned up some whitespace issues
Changed the wording on some of the log entries to avoid confusion between 'Service resuming' and a Service Resume control message
Added logging for the Pause, Resume and Shutdown service control messages.  Previously there was none
Noted Bug id 11 in the win32-service ruby code
Added a commented out handler for the Interrogation event for debuggin purposes
Changed the name of the event log function from raise_windows_event to report_windows_event to avoid connotations with raise
Changed the event source to Puppet so that the correct event source DLL is used.  However it may be a good idea to split the event source between the service and the actual agent so it's easier to read in the Eventlog.  This would require a change to the puppet_for_the_win repo as well.
The eventlog.close command is within an ensure block to stop leaked handles if an error occurs
The --logtofile argument was working for the service but was causing the puppet agent run to fail as it didn't know what to do with it.  Used a simple text substitution to remove it from the args string.
Spelling mistake
Rebasing broke detecting of the --logtofile argument.  Changed the variable used
Changed wording of the log message when putting the service into a paused state.  Now references a Puppet Issue ticket for tracking
The ensure block will make sure that the eventlog handle is not nil before trying to close the handle
Merge branch 'pr/2161'

* pr/2161:
  (PUP-1048) Windows puppet service should log to the eventlog
  (PUP-1048) Windows puppet service should log to the eventlog

This closes GH-2161.