(Maint) Ensure that activerecord tests are isolated

The activerecord based tests would setup activerecord and rails in a
manner that included stubbing. This made some things behave as you might
want, but caused some manner of getting them to behave the wrong way. By
removing the stubbing, the test cases all work from a clean database.

Another issue occured when one of the tests assumed that no other code
that used its indirection had been run prior to it. The test itself was
very questionable and ended up breaking when the tests were run in a
particular order. The test in question tried to assert that the code
would setup activerecord when it was initialized. Since all of the other
tests relied on this, and that particular behavior did not appear to be
important to the external contract of the class, the test has been
removed.
(Maint) Lazily load the activerecord code

Turns out that if you try to load activerecord when it isn't available,
things don't work. One of our test configurations tests without
activerecord and so the loading of this code needs to be delayed until
we know that we really want to run these tests.
(Maint) Provide JUnit output for jenkins

Without JUnit style output we don't have a good way of seeing test
failures within jenkins. This adds a new rake task ci:spec that will
run with junit output, descriptive output and spec order logging.

It turns out that some of the tests would call safe_posix_fork which
ended up closing all open file handles. This ended up also closing the
file handle that rspec would hold open for the junit output formatter.
Those tests have been modified to ensure that the file descripters are
not actually closed.
Provide a high level description of testing within puppet
Add documentation on examples
Add a section on example groups
Document before and after blocks, let blocks, mocks, and stubs
Merge branch 'adrienthebo-doc-introduction_to_rspec'

* adrienthebo-doc-introduction_to_rspec:
  Document before and after blocks, let blocks, mocks, and stubs
  Add a section on example groups
  Add documentation on examples
  Provide a high level description of testing within puppet

closes #1592
[ci skip]
(Maint) Do not overwrite file output

The windows spec code resets the output streams so that it can handle
color correctly. In doing so it assumed that everything was writing to
stdout, which is not the case when -o is used on the command line.
(#20194) Do not perform reverse DNS lookups in webrick

Previously, the webrick-based puppet master would perform a reverse DNS lookup on
every connected socket, even authenticated connections. This occurs when
puppet calls IPSocket#peeraddr to get its peer's IP address. But ruby
would by default perform a reverse lookup at the same time.

This commit sets the global setting via
BasicSocket.do_not_reverse_lookup to handle ruby 1.8.x and up.

The commit also sets the webrick :DoNotReverseLookup configuration
option, which is necessary on at least 1.9.2p0.

Paired-with: Andy Parker <andy@puppetlabs.com>
Merge pull request #1593 from joshcooper/ticket/master/20194_no_reverse_lookups

(#20194) Do not perform reverse DNS lookups in webrick