(maint) Scrub whitespace on global setting descriptions when inserting into man pages

These text blobs use the hanging indent style used in a lot of our embedded doc
strings, so we have to handle that indent properly with scrub.
(PUP-1707) Fix possible gsubs on nil in man page ERB template

In several places, this template would attempt to fall back to summaries if long
descriptions were absent. However, before deciding to use the summary, it would
attempt to do a gsub on nil, which would blow up the entire process.

This commit does the fallback earlier, and adds final fallback text so we won't
be using text methods on nil if the summary is also absent.
(PUP-1592) Speed up loading of user defined types by 2x

When a user defined type is loaded a check is always first made
to see if the name loads a resource type implemented in ruby. The
majority of loads are for non ruby types. The loading must be done with
higher precedence of ruby based resource type over user defined.

This optimization capitalizes on the fact that ruby resource types are
in a flat name space and thus their names can never contain '::'. The
optimization is done in metatype/manager.rb where now an attempt to load
from the type loader is avoided if the name contains a ':'.

This achieves a 2x speedup and generates less permanent garbage (all
user defined type names where internalized as symbols, never to be
gc'd).
(PUP-1676) Environmentpath acceptance test uses basemodulepath

Given that the Directories environment loader gets initialized with
basemodulepath, we have to adjust the master puppet.conf for
use_environment_from_environmentpath.rb to also use basemodulepath so
that we find globally installed modules.
(PUP-1707) Ensure puppet man works for all applications

Adds a spec test that ensures `puppet man <app>` exits with 0 and does
not emit the 'undefined method' error reported in PUP-1707.
Merge pull request #2373 from hlindberg/pup-1592_avoid-type-search

(PUP-1592) Speed up loading of user defined types by 2x
Merge branch 'pr/2359'

* pr/2359:
  (PUP-1707) Ensure puppet man works for all applications
  (PUP-1707) Fix possible gsubs on nil in man page ERB template
  (maint) Scrub whitespace on global setting descriptions when inserting into man pages

Closes GH-2359
Merge branch 'issue/master/pup-1676-basemodulepath-acceptance-fix'

* issue/master/pup-1676-basemodulepath-acceptance-fix:
  (PUP-1676) Environmentpath acceptance test uses basemodulepath
(PUP-1678) List environment settings instead of modules

In talking with consumers of the environment information it turns out
that listing the modules isn't the desired feature. Instead they really
want the settings of the environment (modulepath, manifest). Other
settings may be added later.

This has the added benefit that listing the environments is now a much
cheaper operations since it doesn't need to load the module data.
(PUP-1678) Provide valid, standard source URIs

The URIs that were used before for the source information were
completely made up. The schema wasn't registered and the path elements
didn't mean much. This replaces it with a scheme where the directory
environments are identified by a file URI that points to the directory,
the legacy environments are identified by a file URI that points to the
puppet configuration file, and any static environments are identified by
a data URI with the content of "internal".