(#2888) Add settings catalog info to README_DEVELOPER

Without this patch the README_DEVELOPER doesn't mention the special
settings catalog which I overlooked while working on #2888.  If the
settings catalog was in mind while I worked on this issue I probably
would have solved it a lot faster than it took to track down.

In particular, wrapping the File.open method was an effective way to
quickly track down the codepath that was improperly writing and
truncating the lockfile.
(#2888) Fix race condition with puppetdlockfile

Without this patch applied there is a race condition where by two or
more concurrent puppet agent processes will eventually result in a
deadlock state where all processes consider catalog runs to be
administratively disabled.

This is a problem because the configuration catalog stops being applied
periodically.  The system will not recover unless there is manual
intervention by the end user.

The problem is caused by the settings catalog.  The settings catalog
will contain a file resource for the puppetdlockfile if the file exists.
When two processes are running, the file will exist when it is created
by the other process.  When the file resource is in the settings
catalog, it will be created as a zero length file, or truncated to a
zero length file if it already exists.

Here is the state transition for two puppet agent --test processes, A
and B.

    A:
    lock()
      File.exist? => false
      File.open()
      catalog.run
      ...

    B:
    Puppet::Util::Settings#to_catalog
      File.exist? => true
      catalog.add_resource(Puppet::Type::File)
      ...
      resource synchronizes
      Puppet::Type::File#write(:content)

    A:
    unlock()
      unlink()

    B:
    settings catalog apply
      File.open("puppetdlock", "wb") { ... } # Truncates the file!

    A:
    locked? => true
    mine? => false

    B:
    locked? => true
    mine? => false

    A and B are deadlocked.

This patch fixes the problem by marking the puppetdlockfile settings as
a `:type => :setting`.  This change prevents the settings catalog from
containing a file resource for the puppetdlockfile setting.

Paired-with: Josh Cooper <josh@puppetlabs.com>
Merge branch 'bug/2.7.x/2888_fix_puppetdlock_deadlock' into 2.7.x

* bug/2.7.x/2888_fix_puppetdlock_deadlock:
  (#2888) Fix race condition with puppetdlockfile
  (#2888) Add settings catalog info to README_DEVELOPER
Merge branch '2.7.x' into 3.x

* 2.7.x:
  (#2888) Fix race condition with puppetdlockfile
  (#2888) Add settings catalog info to README_DEVELOPER

Conflicts:
	lib/puppet/defaults.rb
	spec/integration/defaults_spec.rb
Merge branch '3.x'

* 3.x:
  (#2888) Fix race condition with puppetdlockfile
  (#2888) Add settings catalog info to README_DEVELOPER
(Maint) Remove fragile test

This test began to fail with

  1) Puppet::SSL::Key should default to the :file terminus
       Failure/Error: @class.indirection.terminus_class.should == :file
         expected: :file
              got: :disabled_ca (using ==)
         Diff:
         @@ -1,2 +1,2 @@
         -:file
         +:disabled_ca
       # ./spec/unit/ssl/key_spec.rb:20

which was caused by other tests setting the terminus_class for the
Puppet::SSL::Key class. Since this is testing no interesting logic and
just looking at a default (that can be changed and not recovered), I'm
just removing the test.
Merge remote-tracking branch 'upstream/2.7.x' into 3.x

* upstream/2.7.x:
  (Maint) Remove fragile test
Merge remote-tracking branch 'upstream/3.x'

* upstream/3.x:
  (Maint) Remove fragile test
(#16430) acceptance: refactor zone tests

This patch adds new tests to zones, and corrects the earlier zone test cases
so that they take less time by eliminating redundant operations, and making
the zone creation use the default zpool
(#16430) acceptance: refactor cron tests

Changes:
- This patch refactors the cron tests and moves the common code to common_utils.
- This also adds test cases that checks for idempotence and array handling.
- It also removes the randomized users created, and uses a fixed user 'tstuser'
  for cron creation. This was done because using a randomized name such as plddddd
  did not buy us any thing while using a fixed user name gives us better
  predictability on the requirements of system under test
  (mainly that tstuser should be absent).
(#16430) acceptance: refactor package ips

Changes:
- Refacors ips_basic_tests,
- Add test cases for new functionalities versionable and holdable
(#16430) refactor smf tests

This patch refactors smf tests and adds a couple of new tests.
(#16430) refactor zfs tests

This patch refactors the zfs tests and adds extra test cases.
(#16430) refactor zpool test cases.

This patch refactors zpool test cases, and adds a couple of extra tests.
Merge pull request #1155 from vrthra/acceptance/3.x/16430_maint_refactor_solaris_tests

(#16430) maint refactor solaris tests
Commit refactors the solaris test cases.
Fix issue with chown failing in test.

A chown is performed while testing for autoflush and this fails when the
file does not exist. This is by design in the test, the File.open is
stubbed to not create the file. By also stubbing chown, the test is
green.
Maint: Clear global state between tests

Previously, the tests would fail when invoked when random seed 3366,
because of global state associated with the Basetest face application,
in particular, option_parser_commands, which contained the list of valid
commands from the previous test.

This commit adds a method to clear application global state. Note that
the state is not associated with Puppet::Application, but the subclass
that the test defines, which is why test_helper doesn't call it.
Maint: Clear memory instances

Previously, the test would fail when invoked with random seed 3366,
because the `instances` variable associated with the memory terminus was
not cleared between tests. As a result, the test that expected not to
find any data, would fail.

Note the test_helper only restores the indirections' cache_class and
terminus_class. It does not save/restore the indirections' termini or
any data maintained by the termini.

This commit ensures the memory termini's instances variable is cleared
between runs.
Maint: Clear parsedfile target and default_target

Previously, the `target` and `default_target` class variables were not
cleared between tests causing order-dependent test failures.
Maint: Don't overwrite outer sum variable

Previously, these tests failed with random seed 3366, because one of the
tests declared a block whose inner variable overwrote the outer variable
with the same name. So a subsequent test that expected sum to be :md5
would fail.

This commit just changes the inner block variable to not collide with
the outer one.