(PUP-2519) Use File::PATH_SEPARATOR for environmentpath spec

One of the new specs testing the creation of production directory
environment in the settings catalog was using a ':' instead of
File::PATH_SEPARATOR and therefor failing on Windows.  This commit
changes it to use File::PATH_SEPARATOR.
(maint) Reorder code to increase clarity

There were a lot of unless cases that made it hard for me to track down
the path of what was actually accepted. This inverts the branches so
that the if statements lay out what is required for the good case and
the else clauses express the various failures.

In addition there were a few error scenarios where reordering was
possible and reduced the amount of work that needed to be done before
the error was detected.
(PUP-2568) Remove unnecessary calls

There are several calls that can be removed from various paths. Downcase
isn't needed for the PResourceType's type_name, since that is already
downcased (removes a string copy). The other change is that the NAME
pattern can handle leading :: and so that only needs to be stripped off
if it is a valid name (removes a string copy).
Merge branch 'pr/2656' into stable

* pr/2656:
  (PUP-2568) Remove unnecessary calls
  (maint) Reorder code to increase clarity
  (PUP-2568) Downcase class name before validating

Closes GH-2656
Merge pull request #2661 from hlindberg/pup-2581_interpolating-expression-of-bad-name

(PUP-2581) Make illegal names interchangeable to legal variable in interpolation
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2568) Remove unnecessary calls
  (maint) Reorder code to increase clarity
  (PUP-2581) Make illegal names interchangeable to legal variable work
  (PUP-2568) Downcase class name before validating

Conflicts:
	lib/puppet/pops/parser/eparser.rb

Rebuilt eparser.
(PUP-2610) Maintain context during application exit

Because of the way rack servers get configured by puppet, the
application system needs to maintain any context information that is
setup while starting even after the application has exited. This is
because the rack app is created by calling the "master" application and
using the return value (which threads all the way back through the
application and command line layers) as the rack app. When the contexts
were removed on the way out of the application they also removed the
setup for how environments were loaded.

This also required that there be a way of undoing a series of context
pushes without knowing how many had been done. For this there is now a
mark and rollback capability in the Puppet::Context system. This is used
in the tests to always return to the context that was present at the
start of every test.
(PUP-1807) Change empty string to be "truthy"

An empty string is now interpreted as a "true" value. It used to
represent a false value.

This representation is only in the future evaluator. Values are still
transformed when calling the 3x function API (it expect undef to be
encoded as empty string). This also takes place when transforming to the
3x catalog.
(PUP-1807) Add tests cases for undef equality checks

This adds checks that future evaluator treats '' != undef.
(It already did this, but tests were missing).
(maint) Remove commented out code
(PUP-1894) Fix issue with loading EPP from modules

The problem when loading EPP was that the name of the environment was
passed instead of the actual environment (which was expected).
This simply changes this, and adds a test that an epp can be loaded from
a module.
Merge pull request #2664 from zaphod42/issue/stable/pup-2610-rack-fails-to-track-environments

(PUP-2610) Maintain context during application exit
Merge branch 'stable'

Conflicts:
	lib/puppet/application.rb
(PUP-867) Remove support for dynamic defaults for future parser

WHen future parser is in effect, the lookup of default values
will now not look in "parent scopes" (i.e. scopes that *contain*
the resource). Instead it now only looks in inherited and enclosing
scopes + itself.

This removes the confusion that occurs when a class may be included
from different locations, and the location that wins manages to impose
the defaults from its scope. 

This removal goes hand in hand with dynamic scoping being removed
everywhere else.
(maint) Remove trailing commas from three env review calls

Trailing commas on hashes that are the terminal arguments in function
calls were failing when the coordinator running acceptance happened to
be using Ruby 1.8. Removed the commas.
(maint) Replace runtime logging line lost in merge of PUP-2610

This line was added for PUP-1736 and accidentally lost in the merge
churn from PUP-2610 merging up from stable. This just puts it back.
(PUP-2584) Make 404 warning on agent specific and an error.

This changes the general 404 warning issued by the indirection rest
baseclass into being an error if the option :fail_on_404 is passed
as a "query option".

This is then used when asking for a ca certificate, when asking for the
node, when asking for the initial catalog, and when retrieving a catalog
from the master.

The :fail_on_404 will raise an exception, and it is up to the caller to
determine what this means - when retrieving a catalog, there may be
retries etc. By contrast, the request for a ca certificate will fail
immediately on an agent run.

To try this, contact the master with an unknown environment when using
directory environments for the master configuration.

This more specific behavior is wanted because:
* the rest indirection is used for many different things, one of them
being probing through a list of files to use until one is found.
* the use cases where it really matters that master does not respond
with 404 should error out.
Merge pull request #2667 from hlindberg/PUP-1894-epp-in-modules

(PUP-1894) Fix issue with loading EPP from modules
Merge pull request #2669 from jpartlow/issue/master/pup-2584-make-404-warning-specific-and-an-error

(PUP-2584) Make 404 warning on agent specific and an error.
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-2584) Make 404 warning on agent specific and an error.
  (PUP-1894) Fix issue with loading EPP from modules

Conflicts:
	lib/puppet/configurer.rb

Resolved, merging in stable's :fail_on_404 option into the node
indirection request, and keeping master's changes to set a remote env in
the node in the likely case that locally there is no matching directory
env.