SUPNXP-8446: backport soft-delete mode to 5.4.2

This is a backport of NXP-11335 and parts of NXP-7275. Commits:
aaaa4fdd5320c43e4e671c4755f283d620bd3806
d71d0d0ffa45d06b7e7e3436ac71d45e3eeaf57b
7d4bd9440d6f79032128d4ad4bf38906305d9791
9524e94e83ca0a03baea533e52a1b2350a2ab495
aa18c213791ea280e193abb56f24d41905f48bb8
4b937be9957e08e2fff00ec48827ca20841b5306
5d1210eb23c7346a1315433569f55b85619288d5 (in part)
49d69b06e9067e921834ced9b0cafc410eba70b5