compat: Minor compatibility module for Python 2 and Python 3.

This avoids the need of the `six` module.
edx_dl: Use the compat module for interoperability of Python 2/3.