Split Handler into Handler + Formatter classes

This allows the LogStash formatted JSON to be used with any handler, rather than
just the UDP handler.