CURA-6225 Do thread check in the wrapper function, not outside.
This reverts commit 21099e30cb. It was causing a segfault when saving UFP files.
21099e30cb
CURA-6225
CURA-5242
CURA-5229 - Move @call_on_qt_thread to a separate module - Make sure that project writer runs on Qt thread because itself and the calls it makes can create new QObjects such as InstanceContainers, and this must happen on the Qt thread.