Non-blocking logging, and improved log.filter

Logging functions are now in their own module, and are non-blocking.

log.filter command now prints log level as a name, and accepts a
name as a parameter for setting the filter.

The fatal() function prints using log_write now.

fixes #19