Add support for PyQt4

Most issues were with external package pyqtconfig, but these have been fixed there.

This adds a wrapper in the qt.py file that auto-detects PyQt preferring PyQt5 if
available, then trying PyQt4. You can also set the Python-Qt interface to use
from the shell with either of the following:

export QT_API='pyqt'    # for PyQt4
export QT_API='pyqt5'   # for PyQt5

These are in line with the matplotlib interface/wrapper to hopefully avoid problems.