(PUP-1932) Restrict systemd provider to manage file-based services

Prior to this commit, the systemd provider returned in-memory services.
This had a couple odd consequences, e.g. with 'puppet resource service':
1) short-lived services would come and go, though they are not actually
   managed directly
2) disabled and stopped services wouldn't be reported at all

This commit changes the systemd provider to return file-backed
services.
Add docs badge to README
(PUP-1892) File resources do not work with fileservers that are not the current puppetmaster.

the source parameter makes the 'uri' method private; assumably for security, the actual result is that
noone can get the full URI from the source param. The end result is that when collecting the source data
the file_content class uses full_path instead, which gets magically completed to use the puppetmaster.

If your fileserver is in fact some other remote host, that data is lost. This change makes 'uri' public
and adjusts the content handler so that it properly delivers either a URI as a string, or a
full path without leading slash (which is what the previous state was.)
(maint) Indentation fixes in egrammar
Use no-daemonize and not forking service

Making puppet fork and systemd to read PID file seems unnecessary complicated.
Adding dependency on puppetmaster to puppet

Sounds like a good idea to wait with start of puppet agent to finish starting
of puppet mater first.
Make relation between service and sysconfig file obvious

There is puppet service but it's environment file is called puppetagent
(probably due to historical reasons). Making the naming more consistent and
obvious.
(PUP-2158) Hide dir envs behind a feature flag

In too many cases, having the directory environments enabled by default
caused many user's dynamic environments to be detected as directory
environments. This caused broken environments, sometimes in very subtle
ways.

This changes it so that directory environments are not enabled by
default, but can be turned on. It does this by defaulting the
environmentpath to the empty string, and using the empty string to
denote disabled directory environments. When directory environments are
enabled, legacy environments are disabled, and vice versa.
(PUP-2026) Add PCallableType and PCallSignature for lambda and function

These types are used to describe a function or lambda and supports
having multiple overloaded signatures.
(PUP-2158) Default a missing manifest to no_manifest

The tests were often creating environments that didn't need to have
manifests. Since we didn't have a way of specifying that when they
were written, we used '' to fill in the blank. This actually caused a
large number of tests to try to find code to load in the PWD, which
caused tests to break if a developer had parse errors in manifests being
used for testing in the root directory of their puppet project. This
changes the manifest to be optional and removes '' from those tests. The
tests no longer fail if a bad manifest is in the PWD :D
(PUP-2158) Report 404 for missing environment

Now that there is a possibility of environments not existing (when
directory environments are enabled) the API needs to report a 404 Not
Found error when the client requests an environment that doesn't exist.
(PUP-1986) Ignore source_permissions when downloading plugins on POSIX

Module pluginsync is handled by creating a Catalog with a File resource,
and Puppet's File resource defaults to replicating the source file
owner, group and mode. However, owner/group are additionally set to
Process.owner/group for a pluginsync download on POSIX, which will
typically be root during an agent run.

This combination of behavior meant that a root agent run on the puppet
master would cause Puppet's $libdir to be reset to the mode of the first
source module lib, but owned by root.

The puppet master, running as root, chuser's to the service user.  In a
Webrick setup, requests are handled by that service user; in a Rack
setup, it depends on how the Rack service has been setup, but typically
it is the service user again.  So, if the source module had restrictive
permissions, the puppet master, running as the service user, could end
up no longer being able to read $libdir.

On Windows, we were already setting the File type's source_permissions
parameter to :ignore when pluginsyncing.  This commit sets
source_permissions to ignore regardless of the platform, leaving
$libdir's mode unchanged on POSIX as well.

TODO unfortunately this means that owner/group of $libdir are still
being managed on POSIX by pluginsync, which will take precedence over
settings. This seems wrong.
(PUP-1960) Change API of Resource and Class types for undef/array

This changes the API of Resource and Class types so that they:
* return a single type or undef when there is a single key
* return an array of types or empty array when there are multiple keys,
  or when a single key is an array.
  
The arguments are still flattened and compacted.

For Resource, the ability to also pass the type in the array was
removed. i.e. Resource[File, f1, f2] or Resource[File, [f1, f2]] are
allowed but not Resource[[File, f1, f2]].
(PUP-2129) Fix issues with false interpolation start (no-such-method)

This is a fix for the reported issue that 'slurpfunc' is an unknown
method. Thankfuly that problem masked a much worse problem in that any
false interolation start e.g. $%a was not correctly implemented, and
there were no tests that covered this.

The same issue also existed for interpolation in heredoc.
This commit fixes the interpolation problem, and adds tests.
Merge pull request #2514 from hlindberg/pup-1960_change-api-resource-type

(PUP-1960) Change API of Resource and Class types for undef/array
(maint) Update external_ca_support/fixtures with 2048 bit keys

A recent security update is causing httpd package on RHEL6.5 to bring in
a more recent openssl (1.0.1e-16.el6_5.4) which was failing to work with
the 512bit RSA keys in our test fixtures.

This commit updates the certchain.sh to produce 2048bit RSA keys.  This
script was then run to produce a new set of fixture artifacts, and the
cert/keys for the fixtures were then updated from its output.
Merge branch 'maint/stable/external-ca-acceptance-failing-with-newer-openssl' into stable

* maint/stable/external-ca-acceptance-failing-with-newer-openssl:
  (maint) Update external_ca_support/fixtures with 2048 bit keys
Merge branch 'stable'

* stable:
  (maint) Update external_ca_support/fixtures with 2048 bit keys
Merge pull request #2518 from hlindberg/pup-2129_false-interpolation-start

(PUP-2129) Fix issues with false interpolation start (slurpfunc)
(PUP-2158) Fix integration apply application spec

With the environmentpath defaulting to an empty string, we were
attempting to create a '/production' environment directory in the spec
and failing because of permission issues.  Setting environmentpath to a
temp directory before hand now, which was it what was being done in the
test_helper.rb previously.