(#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.
Merge pull request #965 from kbarber/ticket/3.x/15666-return_downstream_comms_error

(#15666) Include downstream error when raising CommunicationsError exception
Remove Network::Authorization code which was only used for XMLRPC

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Remove deprecated method of accessing files in modules

It was possible to refer to a file in a module without including the
'/module/' path component. This has been deprecated for at least one major
release.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Remove code for XMLRPC namespaces

XMLRPC is no longer used and this was dead code.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Merge RestAuthConfig into AuthConfig

There is no longer a meaningful distinction between REST authorization and
XMLRPC authorization.  AuthConfig provided a base class for both XMLRPC and
REST.  This is a problem because it makes the code difficult to understand in
a world where XMLRPC does not exist.  This patch fixes the problem by merging
the behavior of the RestAuthConfig class into the AuthConfig class.  The
AuthConfig class is now solely responsible for REST authorization.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Rename {rest_,}authorization.rb

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Add allow_ip and deny_ip keywords to auth.conf

This commit splits IP based authorization into its own keywords. The allow and
deny keywords no longer operate on IP addresses. The new keywords function
like allow and deny but operate exclusively on IPv4 and IPv6 addresses.
Back references are currently unsupported for allow_ip and deny_ip.

Without this patch there is a security related issue where Puppet could not
distinguish between a certificate name that contains an IP address (cert auth)
and an ip address itself being used to authenticate (ip based auth).  This
patch fixes the problem by separating these out as described above.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Rename rest_authconfig_spec to authconfig_spec

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Merge the old RestAuthConfig specs into the specs for AuthConfig

Since the underlying classes have been merged it doesn't make sense to have
separate spec files.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Refactor AuthConfig parsing into AuthConfigParser

This pulls parsing and file management out of the AuthConfig class. It
introduces the AuthConfigParser class which is responsible for parsing and
returning a new AuthConfig instance. Reloading the AuthConfig from a changed
auth.conf is pulled out into Puppet::Network::Authorization, which already had
partial responsibility for this.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Remove proxy methods going from Rights to Right

These methods were unnecessary, as it's easy to get the specific Right object
and call a method on it.

Paired-with: Jeff McCune <jeff@puppetlabs.com>
Only load auth.conf once

This adds a small singleton class to ensure that auth.conf is only loaded once
per filetimeout interval.
Merge remote-tracking branch 'pcarlisle/ticket/3.x/7705-rest-auth-conf' into 3.x

* pcarlisle/ticket/3.x/7705-rest-auth-conf:
  Only load auth.conf once
  Remove proxy methods going from Rights to Right
  Refactor AuthConfig parsing into AuthConfigParser
  Merge the old RestAuthConfig specs into the specs for AuthConfig
  Rename rest_authconfig_spec to authconfig_spec
  Add allow_ip and deny_ip keywords to auth.conf
  Rename {rest_,}authorization.rb
  Merge RestAuthConfig into AuthConfig
  Remove code for XMLRPC namespaces
  Remove deprecated method of accessing files in modules
  Remove Network::Authorization code which was only used for XMLRPC
Merge branch '3.x'

* 3.x:
  Only load auth.conf once
  Remove proxy methods going from Rights to Right
  Refactor AuthConfig parsing into AuthConfigParser
  Merge the old RestAuthConfig specs into the specs for AuthConfig
  Rename rest_authconfig_spec to authconfig_spec
  Add allow_ip and deny_ip keywords to auth.conf
  Rename {rest_,}authorization.rb
  Merge RestAuthConfig into AuthConfig
  Remove code for XMLRPC namespaces
  Remove deprecated method of accessing files in modules
  Remove Network::Authorization code which was only used for XMLRPC
  (#15666) Include downstream error when raising CommunicationsError exception