(PUP-798) Add call to watch_files to ensure reparsing

This adds a call to watch_file in the code path for the future
parser/evaluator at the same place such call is made in the 3x
implementation. 

The ParserFactory is given an environment, and when this is 
a real environment, its known_resource_types are given to the parser
adapter being created to allow it to make the call to watch_file.
Merge remote-tracking branch 'hlindberg/pup-798_watch-files-must-be-called' into maint/master/test-future-prs

* hlindberg/pup-798_watch-files-must-be-called:
  (PUP-798) Add call to watch_files to ensure reparsing
(PUP-798) E4ParserAdapter watches files through Environment

Instead of passing known_resource_types, if present, pass the given
environment, and provide a delegate method to watch_file on Environment.
Clears up a few layers of type checking and does not require the adapter
to know anything about known_resource_types for the purpose of watching
files, but a valid environment must be passed.
(maint) Uniform use of TypeCollectionHelper in Scope

Scope includes TypeCollectionHelper which provides an accessor for
known_resource_types.  This patch just fixes a direct reference to
environment.known_resource_types to instead use the delegate method the
same as other known_resource_types calls in the Scope class.
Merge pull request #2190 from jpartlow/issue/master/pup-798-watched-files

Issue/master/pup 798 watched files
(PUP-1255) Fix assumed default file mode to 0644

When a file is created with content, the assumed default mode should be 0644,
but this wasn't being explicitly set.  The secure file replacement (in
Puppet::Util.replace_file) was instead defaulting to a file mode of 0600.
The assumed default mode is now explicitly set when calling replace_file.

The code path for file creation without content continues to set a umask of
0022 if no mode is specified on the resource, so new files are implicitly
created with a mode of 0644.
(PUP-1255) Don't use POSIX defaults on Windows

If the POSIX default mode of 0644 is used when creating files on windows the
SYSTEM ACE is lost on files that are not meant to have thier mode managed. This
updates the replace_file method to understand that a nil default mode really
means to use the platform dependent default.
Merge pull request #2203 from kylog/issue/master/pup-1255-incorrect-default-permissions

Issue/master/pup 1255 incorrect default permissions
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (PUP-1255) Don't use POSIX defaults on Windows
  (PUP-1255) Fix assumed default file mode to 0644
(maint) No longer install json gem for future parser acceptance runs

Source based acceptance test runs with --parser future were installing
json gem do to binder requirements, but as much of the binder has been
removed, json is no longer needed.
(maint) Acceptance test selector tests for a string rather than a type

Bare upper case words are types in the future parser, so this test
fails because $operatingsystem returns a string which gets compared to
the Resource[Fedora] type.  Explicity quoting so it's clear what the
intention is in the current parser and so that it works properly with
the future parser.
Merge branch 'maint/master/future-parser-acceptance-fixes'

* maint/master/future-parser-acceptance-fixes:
  (maint) Acceptance test selector tests for a string rather than a type
  (maint) No longer install json gem for future parser acceptance runs
Merge branch 'master' of https://github.com/puppetlabs/puppet