Fix crash when sources list get reassigned
removeValueSource(QObject*) fails when the QObject is already being destroyed, like when it gets called as destroyed() signal handler. This can cause a crash when clearSources() gets called later because the list of sources contains dangling items. So rework the implementation so it always removes correctly.