Before this commit,
log4j logfile name was hardcoded to puppetdb. This broke logrotation
which used @name and so was pe-puppetdb on pe installations.
(maint) Lift variables out of conditionals

These variables (initscriptname, log_dir) are always composed of a string
followed by the @name variable, so it makes little sense to repeat their
definition in each branch of the if @pe conditional. This commit moves them
below the conditional, where @name is defined and they can be safely defined.
(maint) Make the use of @log_dir consistent

Previously, /var/log/@name, @log_dir, and @log_dir || /var/log/puppetdb were
all in use. As @log_dir is always defined when the templates get evaluated,
they don't need a default case to fall back to. This commit makes the use of
@log_dir and @log_dir/@name consistent in the templates.
Merge pull request #683 from haus/ticket/1.5.x/logging_and_more_logging

logging fixes