Port to Qt 5

Port library, QML plugin and test program to Qt 5.