(PUP-3391) Plugin synced for incorrect environment while agent is resolving environment

Before this commit if an agents environment was changed the plugins from
the initial environment were synced instead of the plugins from the
environment where the node would end up. This would cause problems where
a manifest from one environment would be applied with custom types and
providers from a different environment.

This commit changes the behavior to sync plugins after every environment
resolution. We need to sync the plugins after every environment change
because this action needs to be performed before we can retrieve a
manifest for the node in a particular environment.
(PUP-3591) Refactor get_facts to always return a hash

Configurer#get_facts would return either nil, or a Hash, forcing the
main run_internal method to guard its result. I've changed this to
return an empty hash instead of nil for consistency, allowing us to
remove a bit of duplicate code.
Merge branch 'issue/stable/pup-3591-cherry-pick-fix-from-master' into stable

* issue/stable/pup-3591-cherry-pick-fix-from-master:
  (PUP-3591) Refactor get_facts to always return a hash
  (PUP-3391) Plugin synced for incorrect environment while agent is resolving environment
(maint) Fix acceptance test using cached catalog

The enc_nonexistent_directory_environment.rb was failing when it
attempted to run but was using a cached catalog instead of failing
without running a catalog like the test had intended.

This commit uses the -t command on the agent run instead of using all of
the flags that were being used.
(maint) fix production-created acceptnace for passenger systems

Passenger doesn't start up a master process until it's required.
Issue a curl to an endpoint to spurn passenger to startup the master
before testing if the production directory has been created.
Merge branch 'stable'

* stable:
  (maint) Fix acceptance test using cached catalog
  (PUP-3591) Refactor get_facts to always return a hash
  (PUP-3391) Plugin synced for incorrect environment while agent is resolving environment

Conflicts:
	acceptance/tests/environment/enc_nonexistent_directory_environment.rb
Merge pull request #3285 from er0ck/maint/master/fix-production_environment_created_when_missing-passenger

(maint) fix production-created acceptnace for passenger systems