Preparation for python3 support.

Used 2to3 (2to3 --output-dir=python3-version/mycode -W -n
python2-version/mycode) and manual editing. Hints via pyCharm IDE.

This is a new version of pull request #11 on a dedicated python3 test branch for medpy.