(maint) Use same prioritizer throughout catalog

Under normal system runs, there wasn't any problem with the prioritizer
being used, since the Puppet::Resource::Catalog created it and passed to
all of the correct places. However, the testing methods in
PuppetSpec::Compiler ended up lying to the user about the prioritizer
that could be used. The prioritizer that was passed in was not the one
actually used by the catalog for constructing the relationship graph.
This was because the Puppet::Parser::Catalog used the one it had
internally. The answer is to have the Puppet::Parser::Catalog act as one
possible factory of prioritizers, and pass the prioritizer around as it
needs it. This allows the tests to then pass in the correct prioritizer
and use it consistently throughout.
(PUP-2635) use generate instead of eval_generate to purge ssh keys

The generating of ssh_authorized_keys resources for purging is implemented
in Puppet::Type::User#eval_generate. The resources are added as the graph
is being traversed.

This exhibits unexpected behavior under certain circumstances. Specifically,
generated keys can be considered already absent (and hence in sync) if there
is a package resource in the catalog. The error disappears when the
functionality is moved from the eval_generate hook in favor of the generate
hook.

The reasons for the wrong behavior is an issue between the transaction code
and the eval_generate mode of operation. During evaluation, the transaction
will call its #prefetch_if_necessary hook for each resource in turn, which
relies on #resources_by_provider. The latter has a cache and misses all
resources that are added using eval_generate after the initial method call.
As a result, those resources are not passed to the provider for prefetching
and thus remain in an uninitialized state, just as though the resource
would not exist on the target system (ensure => absent). They are therefor
not eligible for syncing/purging.
(PUP-2635) integration test for the purging of authorized ssh keys

Compile manifests that purge keys from a specific file and verify
their effect. Adds a test that detects the eval_generate problem
fixed in this branch.
(PUP-2650) Add disable_warnings setting

This commit adds a new setting that allows users to disable different
classes of warnings. Right now the only supported type of warning that
can be disabled is 'deprecations'.
(PUP-2650) Defer deprecation warnings until we can read disable_warnings

The difficulty with using the value of the disable_warnings setting to
adjust deprecation_warnings issued for other configuration settings is
that we need settings to finish initialization first.  Otherwise
deprecation_warnings become dependent on the order of setting
initialization.  To account for this, I added a deprecated attribute to
base_setting, allowing us to mark any setting as deprecated completely
or allowed_on_commandline.  And the code in settings to issue
deprecations now tracks deprecated settings as they are configured, and
then issues the deprecations after the application is initialized.
Merge branch 'pull-2740' into stable
Merge branch 'stable'

Conflicts:
	lib/puppet/defaults.rb
Merge pull request #2723 from briancain/maint/master/consolidate-methods

(maint) Move duplicate code in /lib/puppet/provider/service/freebsd.rb i...
(PUP-2705) Use source permissions for fact pluginsync

The fix for PUP-1986 caused the agent to no longer apply source
permissions of pluginsync'ed content to the downloaded files. This
caused a regression with external executable facts, since they must be
executable on the agent in order for facter to execute them.

This commit re-enables using source permissions during fact pluginsync,
while continuing to ignore them for module pluginsync.
(maint) Test downloader behavior, not implementation

Test the behavior of the Puppet::Configurer::Downloader#file method, instead
of how it constructs a file resource.
Merge branch 'pr/2715'

* pr/2715:
  (maint) Test downloader behavior, not implementation
  (PUP-2705) Use source permissions for fact pluginsync
Merge branch 'pr/2715' into stable

* pr/2715:
  (maint) Test downloader behavior, not implementation
  (PUP-2705) Use source permissions for fact pluginsync
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
Merge pull request #2707 from ffrank/ticket/3.6.1/PUP-2635-issues-with-ssh-key-purging

(PUP-2635) use generate instead of eval_generate to purge ssh keys
Merge pull request #2727 from kylog/issue/pup-2710/audit-comparison-should-compare-strings

(PUP-2710) For audit only, compare Time objects as strings
(PUP-2710) Check that 'b' is a Time object before accessing tv_sec method

The initial fix checked that 'a' was a Time object but not that
'b' was a Time object - incorrectly reasoning that the code would
always compare like objects. However, when a property was previously
absent, the comparison might be between a Time object and the :absent
symbol. The fix is thus to check that both sides of the equality
comparison are Time objects first.
(PUP-2635) Skip this test on windows
Merge pull request #2739 from zaphod42/maint/stable/allow-prioritizer-to-be-used-in-tests

(maint) Use same prioritizer throughout catalog
Revert "Merge pull request #2589 from daenney/add-ensure-type-logging"

This change added a lot of debugging information to every property
change made, which isn't needed for normal operation and clutters up the
output. In addition properties can define `#is_to_s` and `#should_to_s`
which can completely change how properties output change, so this change
by itself is somewhat misleading:

    [root@master puppet]# bundle exec puppet resource file /root mode=0600 owner=vagrant group=vagrant
    Notice: /File[/root]/owner: owner changed 'root' of type Fixnum to 'vagrant' of type Fixnum
    Notice: /File[/root]/group: group changed 'root' of type Fixnum to 'vagrant' of type Fixnum
    Notice: /File[/root]/mode: mode changed '0550' of type String to '0700' of type String
    file { '/root':
      ensure => 'directory',
      group  => '500',
      mode   => '700',
      owner  => '500',
    }

In this specific case https://github.com/puppetlabs/puppet/blob/3.6.1/lib/puppet/type/file/owner.rb#L34-L41
overrides the default is_to_s behavior, which indicates that this cannot
be done as a default and in fact should be up to the type author to
modify `#is_to_s` and `#should_to_s` as needed during debugging.

This reverts commit f89f1a536e22a04dc80a3b1c4c2d729693ce6b42, reversing
changes made to 34f55e1840b5dadadb84f95391a842a7b50a6540.
Merge branch 'revert-pup-2369'