Fix typos and incorrect documentation format in log.h
Sanitise logging macro names, and move the logging macros to log.h

This removes support for compilers which do not support C99 variadic macros, but as the server now uses many other features of C99 this should not be an issue.