Python3 fixes

This is a refactoring of the work that was already done by @barthess in #257, so pretty much all credit for this goes to him. I just took his code and expanded the changes to the rest of the codebase, left out the XML validation changes he made, and removed all the whitespace changes so that this PR is much smaller and readable.

All code was tested as valid Python27 and Python33 code by running the following from the root MAVLink project directory:
```
python -m py_compile `git ls-files | grep "\.py"`
```

I don't know if people want to support Python 2.6 at this point, since Python 2.7 is >5 years old at this point even, but that will likely need a bunch of `from __future__ import XXX` import statements to work. I have not done that at this stage, and hopefully won't need to to merge this.