Properly detach frontend/backend physics objects


It is possible to destroy the frontend and backend objects independently
of each other, so we need to make sure they are properly detached from
each other in both cases. This simply means that we set the respective
pointers to frontend and backend to null.

Fixes: QTBUG-117058
Pick-to: 6.5 6.5.3 6.6
Change-Id: I057b04b3eb18e9c80ab916c62966e49320bf29d9
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
commit2669a3936389dba313ef623f4115f47c589a5913
parentf19bc9e71562329eba4866f56f3ebcadde41bc0c
authorJonas Karlsson <jonas.karlsson@qt.io>
committerJonas Karlsson <jonas.karlsson@qt.io>
commit timeTue, 19 Sep 2023 11:53:10 +0200