We most likely want simplejson first
Simplify check for string in record formating
Use dict.get instead of ternary statement
Drop unused imports
bytes is a reserved keyword
Fix more pylint recommendations
PEP8/misc fixes

Fix indentation, spacing, imports order, variable names, etc.
Increase conformance to Handler subclassing rules

According to documentation and existing functions:
    * _close should be close and call Handler close to properly
      unregister from existing handlers
    * emit should not re-filter logs, it is handled by the format
      function.
    * __init__ should not set a formatter, it is the responsability of
      the dev to do so. Old code forbid subclassing the formatter and
      using it.