It wouldn't be necessary in Qt5 where QVariant is more clever, but for
the time being workaround the lack of knowledge in QVariant of the
QObject inheritance tree.
Force the ObjectRole in QueryTreeModel to always wrap a pointer to
Artifact note one of its sub-types.
Requires adjusting a bit the page models to deal with it properly.
This repairs the editor in Renku.