Port C++ parts to Qt 5.12
Compatibility with Qt 5.9 is kept.
The second commit in this PR ("Add some QML type registrations") is new code for Qt 5.9, it compiles but I'm not sure if it breaks anything on 5.9, it definitely fixes loading with newer Qt versions. For example:
file:///usr/lib/qt/qml/QtQuick/Controls.2/Suru/Menu.qml:79 ElevationEffect is not a type
Please test :) Also if the second commit works fine on 5.9, please squash the commits before merging!