(PUP-3030) Add Uniquefile tests, ported from Ruby source

This commit adds additional tests for the Uniquefile class.  The
new tests are ported from the Ruby 1.9.3 source code for the
built-in `Tempfile` class, since that is what our `Uniquefile`
implementation is based on.

See: https://github.com/ruby/ruby/blob/v1_9_3_547/test/test_tempfile.rb
(maint) Require forwardable in puppet/settings.rb

Commit a8e9aa6 extended Puppet::Settings with Forwardable, but did not
require it.  This passed specs, but failed in acceptance when run with
system rubies (locally with rvm/rbenv, we're not seeing a problem).
Requiring forwardable, as we do in other files seems to fix the issue.
Merge pull request #2989 from jpartlow/maint/master/require-forwardable-in-settings

(maint) Require forwardable in puppet/settings.rb
(PUP-2889) Bump win32-eventlog dependency to ~> 0.6.1

Previously, the x86 version of the puppet gem depended on win32-eventlog
~> 0.5.3 which is not ffi compatible. This was caused when eventlog
changes were reverted in 35b1abc1, and then reimplemented in
537b0572, but the corresponding eventlog dependency was not bumped.

This commit bumps the dependency to use ~> 0.6.1 for x86. The x64
version already correctly depends on ~> 0.6.1.
Merge branch 'master' into puppet-4

* master:
  (PUP-2889) Bump win32-eventlog dependency to ~> 0.6.1
  (maint) Require forwardable in puppet/settings.rb
  (maint) Use tlsv1 when curling in acceptance in general
  (maint) Use tlsv1 when curling the master from another agent
  (maint) Improve two test by checking they have no effect on catalog.
  (maint) Fix optimization that altered semantics for += production
  (perf) Speed up setting lookup
  (perf) Several small performance improvements
  (maint) Express language tests in puppet language
  (PUP-3054) Ensure that inherits are absolute
  (maint) Extract language specification tools
  (maint) Cleanup comment
  (PUP-2349) Add deprecation warning for non-string mode property values
  (PUP-2349) Specify mode as a string containing an octal mode
  (PUP-2349) Treat mode strings as octal
  (PUP-2924) Initialize resources from Type classes
  (PUP 229) Fix /etc/shadow parsing so that max/min_age is reported correctly
  (PUP-3050) Update cfacter option for recent cfacter gem changes.
  (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

Conflicts:
	lib/puppet/defaults.rb

Retained masterlog removal from PUP-2953
(PUP-3032) Add comment explaining ordering of settings accessors
(PUP-2889) Eventlog specs pending Windows 2003

 - win32-eventlog gem upgraded from 0.5.3 to 0.6.1 as part of
https://github.com/puppetlabs/puppet/commit/ac8d4e257f69beaf87489b2e2a57f8aaab512edc
 - win32-eventlog gem 0.6.1 doesn't yet include the patch necessary to
   properly load it on 2003 from:
https://github.com/djberg96/win32-eventlog/commit/4692e2a67ae8dc794981928d6e6488b775a6689a
 - Therefore, mark these eventlog tests as pending on 2003 until the
   0.6.2 gem ships and the Gemfile can be updated
 - These guards will be removed as part of PUP-3061
Merge pull request #2991 from Iristyle/ticket/master/PUP-2889-mark-eventlog-specs-pending-windows-2003

(PUP-2889) Eventlog specs pending Windows 2003
Merge branch 'master' into puppet-4

* master:
  (PUP-2889) Eventlog specs pending Windows 2003
Merge pull request #2971 from zaphod42/issue/master/pup-2631-non-existant-env-produces-long-message

(PUP-2631) Elide long URIs for 404 message
Merge pull request #2982 from hlindberg/PUP-1044_filebucket-less-memory

(PUP-1044) Make FileBucket::File use a file when possible
Merge pull request #2984 from cprice404/bug/master/PUP-3030-server-side-tempfiles

(PUP-3030) More explicit handling of tempfiles on the server
Merge pull request #2985 from cprice404/feature/master/PUP-3032-setting-to-cache-feature-load-failures

(PUP-3032) Add setting to always cache `feature` load attempts
(PUP-1044) Fix mode of stream used by filebucket to be binary

The stream used by a FileBucket::File in #stream opened the file
with 'r' mode which will cause end of line translation on windows.
The corret binary mode for reading is 'rb'.

This also does some maintenance changes by removing parentheses and
semicolons that are not needed.
Merge pull request #2983 from demophoon/PUP-2999/master/fix-jvm-puppet-tests

(PUP-2999) Fix jvm-puppet acceptance tests
Merge branch 'master' into puppet-4

* master: (27 commits)
  (PUP-1044) Fix mode of stream used by filebucket to be binary
  (PUP-3032) Add comment explaining ordering of settings accessors
  (PUP-3030) Add Uniquefile tests, ported from Ruby source
  (PUP-1044) Replace IO::copy_stream with FileUtils.copy_stream for 1.8.7
  (PUP-3030) Rename P::F::Tempfile to Uniquefile
  (PUP-3030) Flesh out implementation of P::F::Tempfile
  (PUP-3030) Port P::U::Execution to use our Tempfile
  (PUP-3030) Port Util#replace_file to use our Tempfile
  (PUP-3030) Refactor 'store' report to use replace_file
  (PUP-1044) Fix missing file mode in call to file system open
  (PUP-3032) Add setting to always cache `feature` load attempts
  (PUP-1044) Cleanup commented out code, and comments
  (PUP-1044) Add info output for when file/string is used for checksum
  (PUP-2999) Re-enable tests for jvm-puppet.
  (PE-4848,PUP-2999) Ensure temporary directories ownership is correct.
  (PE-4848,PUP-2999) Change puppet_tmpdir to create_tmpdir_for_user
  (PE-4848,PUP-2999) Skipping test for now, need support for DNS Alt names in JVM puppet
  (PE-4848,PUP-2999) Disable ticket-7117 test since has dependency on dns_alt_names CA work
  (PE-4848,PUP-2999) Disable test for JVM Puppet
  (PE-4848,PUP-2999) Don't run apache external test on jvm
  ...

Conflicts:
	lib/puppet.rb

Resolved in favor of puppet-4's removal of @services (8e84deb)
(PUP-3030) confine uniquefile unlink tests

Two of the new tests re: Uniquefile are not compatible with
windows.  (In the ruby source tree, they are skipped on windows.)

This commit confines them to only run on unix.
Merge pull request #2993 from cprice404/bug/master/PUP-3030-confine-uniquefile-unlink-tests-to-unix

(PUP-3030) confine uniquefile unlink tests
(maint) Clarify docs for certificate_status

Prior to this commit, the SAVE and DELETE sections of the
certificate_status HTTP API docs were conflicting.
This commit corrects the documentation of the SAVE section
to match the actual Puppet behavior and be consistent with
the DELETE section.
Merge branch 'master' into puppet-4

* master:
  (PUP-3030) confine uniquefile unlink tests