Enable Python 3 compatibility

@ejeschke and @cdeil - this fixes Python 3 compatibility. A couple of notes:

- If you want to build for Python 3, and you've previously built for Python 2 (or vice-versa) you have to remove ``build`` otherwise ``2to3`` won't run.

- I had to change tabs to spaces to prevent errors - the diff for a couple of files is quite large, but it's just a change in tabs.

- The GUI hangs for me once it's open, but I'm not sure if this is a Python 3 error as I've yet to test with Python 2

- The ``ginga`` script needs to be made compatible with Python 2 and 3 because it doesn't get 2to3'd