encode emoji to bytes before writing

- fix issues with python2 encoding errors when stdio encoding
  is not set correctly.
document sandbox --mysql-user option
minor formatting cleanup
enable stats for sieve
improve sieve's error report with bad input
separate view and view_temporary classifiers to improve stats

- previously both the temporary MYISAM table structure used for
  views and the actual "CREATE ... VIEW" section itself were
  classified as 'view' by sieve.  Now the temporary structure
  is classified as 'view_temporary' to allow counting it
  separately and avoid double counting views.
enable decompression of file objects

- allows for a specific compression type to be specified
  or will otherwise try to discover the compression type
  by checking magic bytes on the fileobject. Automatic
  compression detection is only done for regular files
  that support seek operations.
fix bug in reporting sieve failures

- previously used an incorrect api.  now output the raised
  exception string on stderr.
remove unnecessary close_fds=False

- used when troubleshooting python2/3 binary io failures
implement transparent decompression in sieve

- if input is seekable, this goes through the decompression
  api and should transparently handle common compressed
  formats without issue.  A sanity check to skip this
  on uncompressed output is done as well and will simply
  pass through the input as-is otherwise.
cleanup sieve cli frontend

- ensure input file is a binary stream - this detaches
  the buffered stream under python3
- stats are now output by the cli frontend and returned
  by core/mysql/sieve api
- cleanup error message on a SieveError
update sieve tests to use transparent decompression

- removed requirement for GzipFile preprocessing in the
  test suite and exercises the decompression api.
Merge branch 'feature/sieve_detect_compression' into develop