build system: fix unity builds


we need to avoid polluting the global (or qt) namespace by moving the
`using namespace Qt3DXXX` statements into the namespace where it's
actually required.
furthermore:
* replace `QT_USE_NAMESPACE` with `QT_BEGIN_NAMESPACE`/`END` pair
* exclude some translation units with name clashes inside anonymous
namespaces

Change-Id: I5301b55c6a0c7079602c759f5bde152354149880
Pick-to: 6.7
Reviewed-by: Mike Krus <mike.krus@kdab.com>
commit06bb491354489b06998306ea9de87da92314b397
parent84423051fedf1ec51fffe781ba52affe52f1a8e5
authorTim Blechmann <tim@klingt.org>
committerTim Blechmann <tim@klingt.org>
commit timeWed, 7 Feb 2024 17:23:03 +0800