Extract logging functions to standalone file

Without this patch, the Puppet logging functions are attached to the
*root* environment and cannot be reloaded. This commit removes the
special handling of the logging function and extracts them into the
standard location for parser functions.