Support for Python3

The major changes:

- Wrapper functions for serial write and read. Python2 uses strings and
  Python3 uses bytes. The wrapper function handles the difference.
- Only use `ord()` in Python2. Bytes don't need this.
- General version checking when the bytes vs str distinction matters.
- Checking around other function name changes.