Get rid of all the Qt/Qml crap until it gets sane exception handling
Implement copy-on-write for ThreadContext