Add PyQt5 support

This PyQt5 support is a port of the PyQt4 hooks and helper functions.
It may not yet be complete.