(PUP-1099) Fix incorrect permissions in RPMs

The RPM spec template uses extremely restrictive permissions for `log`
and `lib` directories. These permissions were being incorrectly applied to
`examples` during packaging. This corrects that problem by resetting
default attributes after restricting `log` and `lib` directories.
(PUP-665) Don't call hooks unless absolutely necessary

Calling hooks on configuration settings that don't have them forces the
code to interpolate any `$variable`s in the value of the setting. There
are a couple places where the hooks are called before everything has
been fully prepared (such as in initialize_global_defaults) and so run
mode settings such as confdir are not available.

This restores the old behavior in which only settings with hooks will
end up going down this path. This doesn't fully address the problem, but
it does make the surface area much smaller.
Merge pull request #2178 from zaphod42/issue/master/pup-665-interpolating-variables-too-early

(PUP-665) Don't call hooks unless absolutely necessary
Merge pull request #2171 from mckern/ticket/stable/PUP-1099

(PUP-1099) Fix incorrect permissions in RPMs
Merge branch 'stable'

* stable:
  (PUP-1099) Fix incorrect permissions in RPMs
Merge branch 'master' of https://github.com/puppetlabs/puppet