style refactor

This PR will clean up the style/syntax of node-logfmt and provide a number of bugfixes. The goal is a more idiomatic and readable style less prone to bugs.