fixes #2085 - load Puppet 3 app defaults for master mode too

Allows $confdir and other run mode specific settings to be initialised from
the defaults present in Puppet::Util::RunMode.  When requesting detail on
classes, the Puppet parser indirectly requests app level settings so both
global and app settings are needed.  Refactored into shared code for both
parser and environments to use.
Fixes #2143: Only create the log file parent dir if daemonize is true