Add syslog logging mechanism

This PR changes the logging mechanism to use syslog(). The ability to
log to stderr is still available.

The interface for the already in use logging function calls is _not_
changed by this PR, but the implementation.

Review carefully.