0.8.1 minor relesae

Build fixes for Python 3.6, cleanup of unused includes and functions,
and fixes a memory leak in the logging function.
This tag has no release notes.