Optimizations and minor rewrites

This commit features minor optimizations, the addition of NULL to
discard all output when specifying log levels, and justification of
comments.

It should not break any existing implementations, but the previously
named MyOutput() was renamed and made unexported. Any hard-coded
versions of LogLevels such as 0 for EMERG, 1 for ALERT, and so on will
not break, even though they deserve to.