(PUP-1976) Use metadata.json as canonical metadata source.

Prior to this commit, the Modulefile was used as the primary source of user-facing metadata for modules.  This file was executable Ruby, which was intended to describe a simple data structure.  This causes a few problems for us in the long-term, including making automated module builds a significantly more difficult proposition, and making changes to acceptable metadata a slow process (requiring new releases of Puppet).  In addition, the only piece of Puppet code that interacted directly with the Module file was the `module build` action – anywhere we actually need to know something about the module, we look it up from the metadata.json file.

This commit removes this level of indirection between user input and module data, making the metadata.json file a first-class citizen in Puppet modules.  It similarly deprecates the Modulefile as a supported source of module data.  Checksums have also been moved into their own file (per PE-3124), and `puppet module changes` has been updated to leverage the new file when available (per PE-3120).

For users building a module containing only a Modulefile, this will issue a warning that the Modulefile is deprecated, and output the corresponding metadata.json file.

For users building a module containing both a Modulefile and a metadata.json file, this will issue a warning that the Modulefile is deprecated and is being ignored.
(PUP-1977) Update `puppet module generate` to create `metadata.json`

Prior to this commit, running `puppet module generate` would create a Modulefile with the appropriate metadata, from which a metadata.json file would be generated when you ran `puppet module build`.  Since we're migrating away from the Modulefile as the canonical source of metadata (as per PE-3117), this commit will instead generate an equivalent metadata.json file when the module is created.
(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.)
(PUP-2093) Integrate a dedicated dependency resolver.

Prior to this commit, we relied on the Forge's /v1 API to handle dependency
resolution for us; as we move away from that (now outdated) API, we will need to
take responsibility for that functionality in our own codebase.

This change vendors our own dependency resolver, as a stopgap measure. This is
not expected to be reused by consumers of Puppet, and will be deprecated and
removed from this codebase when the dependency resolver is properly published.
(PUP-2093) Migrate PMT to /v3 API.

Prior to this commit, the PMT managed all communication with the Forge via the
(now legacy) /v1 API. That API has been deprecated (primarily due to scalability
concerns), which is less of an issue since it was never officially a public API.

This commit migrates all communication to the Forge to the new /v3 API, which is
expected to be launched as our official public API "soon". This commit also
integrates a standalone dependency resolver, as the /v3 API contains no implicit
dependency resolution (as the /v1 API did); consequently, large portions of the
PMT code have been changed, and others have become unreachable.

This commit also changes the default host that the PMT communicates with, from
https://forge.puppetlabs.com to https://forgeapi.puppetlabs.com (the natural
URL for the Forge API service). Since the tool now expects to communicate with
a completely different service, it will be unable to communicate with services
that do not implement the same /v3 API.
(maint) Indentation fixes in egrammar
(PUP-1964) Handle nil class parameter value

The problem was that nil was not transformed to undef for the result
of a parameter default expression and nil was interpreted as value
missing by the 3x class/define logic.

This adds a transformation in the PopsBridge by introducing a new kind
of bridging expression. Likewise, a transformation was needed back again
to nil as the value was set in TypeCalculator when performing an
inference and symbol :undef can not be used where a String is expected.

It was also observed in PUP-1964 that the error that surfaced lacked
location information. This was caused by the transformation of
unparenthesized call, where the transformed call expression did not
get location information set.

Tests added for the two different problems.

The factory method for recording position now also checks if the
end_locateable is void of location information (which can happen
in some transformations).
(maint) Remove assignment w/o effect
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.
Merge pull request #2509 from hlindberg/pup-1964_handle-nil-class-parameter

(PUP-1964) handle nil class parameter
(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-2093) Restore use of JSON (over PSON).

In master, we've officially introduced a dependency on the JSON library,
but the previous commit in this branch unintentionally reverted a part
of that commit due to merge conflicts.

This commit restores the use of the JSON library where it had been
previously removed.
(PUP-2093) Support hyphenated module names as dependencies.

In master, hyphenated module names are supported (effectively)
everywhere except as the name of a dependency. A previous commit in this
branch attempted to alleviate that situation, but failed to adequately
test the change and its implications, and potential failures existed.

This change introduces a change to existing tests that triggers the
offensive behavior both in master and in this branch, and refactors the
implementation to apply the necessary transliteration in all required
locations.