Use rspec 2.11 compatible block syntax

In rspec 2.11, expectations on a block must take the form of expect...to or
lambda...should. Other combinations of those are no longer accepted. This
commit converts all mixed cases to use expect...to, as it seems to be the
preferred syntax now.
Merge branch '2.7.x' into 3.x

* 2.7.x:
  Use rspec 2.11 compatible block syntax

Conflicts:
	spec/integration/faces/ca_spec.rb
	spec/integration/network/server/mongrel_spec.rb
	spec/unit/application_spec.rb
	spec/unit/face/help_spec.rb
	spec/unit/network/handler/fileserver_spec.rb
	spec/unit/parser/functions/create_resources_spec.rb
	spec/unit/provider/nameservice/directoryservice_spec.rb
	spec/unit/type/file_spec.rb
	spec/unit/type_spec.rb
Merge branch 'non-string-resource-titles' of https://github.com/nicklewis/puppet into 2.7.x
wip
Make 3.x specs compatible with rspec 2.11
Revert "Merge branch 'fixpid' of https://github.com/vrthra/puppet into 3.x"

This reverts commit fe64cdeaa210534e64c37caa47a86df070da9b26, reversing
changes made to 9174a290ee035706381758088303eb5756e058e7.

After some discussion, we've decided this isn't ready to go yet and
should be backed out until the required changes have been made.

<hailee@puppetlabs.com>
Use rspec 2.11 compatible block syntax

In rspec 2.11, expectations on a block must take the form of expect...to or
lambda...should. Other combinations of those are no longer accepted. This
commit converts all mixed cases to use expect...to, as it seems to be the
preferred syntax now.
Merge remote-tracking branch 'origin/3.x' into 3.x

* origin/3.x:
  Revert "Merge branch 'fixpid' of https://github.com/vrthra/puppet into 3.x"
  Revert "Merge branch 'non-string-resource-titles' of https://github.com/nicklewis/puppet into 3.x"
  Fix buggy resource title tests
  Don't allow resource titles which aren't strings
Merge remote-tracking branch 'origin/2.7.x' into 3.x

* origin/2.7.x:
  Use rspec 2.11 compatible block syntax

Conflicts:
	spec/unit/network/handler/fileserver_spec.rb
Merge pull request #966 from kbarber/ticket/3.x/15676-ssl_acceptance_test_uses_localhost

(#15676) Fix puppet module face SSL acceptance tests to use masters real hostname
(#15666) Include downstream error when raising CommunicationsError exception

Previously we were seeing errors being returned in the acceptance framework,
when the puppet module face had problems but the existing error message is far
too generic to be used to understand the root cause of such problems.

This patch changes the read_response code and CommunicationsError exceptions so
that the underlying comms error message is exposed to the client. The generic
message has been kept, but a new line 'Details:' has been added that will
expose the underlying error.

This patch solves this problem by accepting the original exception that was
called, and using the message of that exception to describe the detail.

To make sure the generic error will catch and wrap the correct exceptions, we
have added a list of what we believe are the common exceptions that Net::HTTP
raises when remote or network problems occur. Other exceptions will continue to
be raised up to the face as per normal.

Test coverage has been added to make sure the exceptions behave as expected, as
this was lacking beforehand.