(maint) Log invalid modules

Give notice when a module on the modulepath is invalid, explaining why.
To do this cleanly, we stop trying to add "." and ".." as modules since
these are always invalid.
(maint) Avoid checking for strings in module_references

module_references contains Hashes so there is no need to look for
strings within it, especially when the next line does what this one was
supposed to do.
(PUP-3511) refactor Application.run for reuse

Extract a small chunk of code from Puppet::Application.run into its own
method so that it can be reused.  This code is currently duplicated in
Puppet Server; the introduction of this new `reset_environment_context`
method enables the replacement of the duplicated code in Puppet Server
with a call to this method.
(PUP-3511) refactor 'configure_indirector_routes'

Add a `self` version of `configure_indirector_routes` which takes the
application name as a parameter.  This method is currently copied into
Puppet Server, and the new version of it will allow for the duplicated
version in Puppet Server to be deleted.
(PUP-3511) introduce 'ApplicationSupport' module

Introduce a new module named 'ApplicationSupport'.  Move
'configure_indirector_routes' into this module.  Move
'reset_environment_context' into this module, and rename it to
'push_application_context'.
(PUP-3511) yardoc for 'push_application_context'
(PUP-3303) Remove deprecated binread implementation
(PUP-3511) update docs in 'ApplicationSupport'
Merge pull request #3304 from kylog/issue/pup-3303/remove-deprecated-binread

(PUP-3303) Remove deprecated binread implementations
(PUP-3429) task_scheduler should use 'day_of_week' instead of 'on'

Populate 'day_of_week' instead of 'on' when loading existing triggers. This
should prevent constant changes from being registered.
(PUP-3665) Fix resource overrides for 4x collector

Prior to this commit, the new implementation of collections caused
overrides to fail if the given attribute was a Resource. This was
because 3x required an instance of Resource rather than PResource
Type. In order to fix this issue, transform the override attribute
into the appropriate format for the 3x compiler.
Merge branch 'ticket/master/PUP-3429-weekly-task_scheduler'

* ticket/master/PUP-3429-weekly-task_scheduler:
  (PUP-3429) task_scheduler should use 'day_of_week' instead of 'on'
Merge pull request #3307 from hkenney/issue/stable/PUP-3665_fix_collection_resource_overrides_with_future_parser

(PUP-3665) Fix resource overrides for 4x collector
(PUP-3096) Remove deprecated trusted_node_data and immutable_node_data options

This commit removes the deprecated trusted_node_data and
immutable_node_data options from puppet/defaults. This ensures
that $facts and $trusted are always available so that we can
start phasing out facts as top-scope variables.

This commit is part of the Puppet 4 code removal effort.
(maint) Verify module exception is logged

Verifies that if puppet fails to load a module, e.g. missing metadata,
that we log the exception:

     $ bundle exec puppet apply -e "include mymodule"
     Error: No dependencies module metadata provided for mymodule
     Error: Could not find class mymodule for ...
(maint) Refactor tests to use helper to create module directory

Refactor tests to use PuppetSpec::Modules.generate_files to create
the module directory. Note the order of arguments is reversed.
Merge branch 'pr/3261'

* pr/3261:
  (maint) Refactor tests to use helper to create module directory
  (maint) Verify module exception is logged
  (maint) Avoid checking for strings in module_references
  (maint) Log invalid modules
(PUP-3512) Remove the old Profiler profile API

Remove the old Profiler profile API, which supported calls to
profile without a metric ID. Remove tests that ensured the
old API worked.
Merge branch 'stable'
Merge pull request #3308 from fpringvaldsen/PUP-3512-profiler-deprecation

(PUP-3512) Remove the old Profiler profile API