Reorganize encoding.py so it doesn't rely on imports in __init__.py (#234)

* Move functionality in encoding.py to encoding_helper.py

* Add encoding.py file that imports encoding_helper and extra_types
4 files changed