New logging system

A new policy-based logging system.
See log_configure.h for the actual configuration and some examples.