(PUP-2693) Fix length calculation for sq-string

The calculation of string length was done wrong for dingle
quoted string resulting in negative lengths.
(PUP-2807) Add output of containing scope for log functions

The log functions in 3x outputs th name of the containing scope
(for notice etc.). The reimplemented methods for the 4x function API
did not include this behavior.

Now, the calling scope is passed to the Logging utility to be output
the same way as for 3x.
(PUP-2891) Treat override of class as an error.

This makes an attempt to override a class parameter issue an
error from the runtime layer rather than expecting the underlying
3x implementation to do it when the left expression does not
result in a resource, or a resource that has 'class' as resource type.
(PUP-2883) Allow empty body in epp templates

This allows an epp body to be empty by making grammar accept an
empty list of statements. This avoids getting a cryptic error message
about "syntax error at end of file" when using parameters, but having no
body that produces output, or when having a completely empty template.
(PUP-2873) Reasonable default logdests for master

Commit a1dba44 removed a potentially duplicate log destination when
using `puppet master --compile`, but it also meant that `puppet master
--compile` would default to logging to syslog. This issue revealed other
issues, where running `puppet master --no-daemonize` would log to
syslog, but `puppet master --no-daemonize --verbose` would log to the
console. Inconsistencies like these could lead to very surprising
behavior for users.

This commit refactors the master logging to default to console when the
master is running in the foreground and to syslog when running in the
background. When a log destination is given with '--logdest' the default
log destination is ignored in preference of the explicit log
destination.
Merge pull request #2856 from adrienthebo/fix/master/pup-2873-better-master-logging

(GH-2873) Reasonable default logdests for master
Merge pull request #2792 from hlindberg/PUP-2807_log-containing-scope-name

(PUP-2807) Add output of containing scope for log functions
Merge pull request #2868 from hlindberg/PUP-2883_empty-epp-template

(PUP-2883) Allow empty body in epp templates
Merge pull request #2755 from hlindberg/PUP-2693_length-of-sqstring-wrong

(PUP-2693) Fix length calculation for sq-string
Merge pull request #2845 from hlindberg/PUP-2891_override-class-parameters-error

(PUP-2891) Treat override of class as an error.
Merge branch 'master' of https://github.com/puppetlabs/puppet