Separate logfile from logger.

Logfile implements a general class for logging where a buffer can be
written to a memory-mapped file.

Logger uses logfile to implement a template class for logging objects.