ble example: fix namespaced builds


The forward declaration of class QLowEnergyService in bleiodevice.h
sits at global scope, so declares a second QLowEnergyService in
namespaced builds, and makes the following uses of the name ambiguous.

Unlike in the websockets example fixed in an earlier commit, here GCC
actually complains about the UB:

    connectpage.cpp:129:21:   required from here
    qpointer.h:54:17: error: invalid ‘static_cast’ from type ‘QLowEnergyService*’ to type ‘Qt6::QPointer<QLowEnergyService>::QObjectType*’ {aka ‘Qt6::QObject*’}
       54 |     { wp.assign(static_cast<QObjectType*>(p)); return *this; }
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    connectpage.h:18:7: note: class type ‘QLowEnergyService’ is incomplete
       18 | class QLowEnergyService;
          |       ^~~~~~~~~~~~~~~~~

Fix by replacing the forward declaration with an include.

The other types are actually used in-name-only, so keep the forward
declarations, but wrap them in QT_BEGIN_NAMESPACE/QT_END_NAMESPACE.

Add a missing <memory> include for unique_ptr.

Amends 846d26ca8ff95593aa44d32556b05da58ed94aa1.

Pick-to: 6.6 6.5
Change-Id: I277ca4896a8dc7fd8a36848c9caa352297635c05
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitfa3fe7327250566ff77d3dc17fd3fff97e8ff725
parente5a461ac978433a284cc8f4309fdfa326a34a2c0
authorMarc Mutz <marc.mutz@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeWed, 2 Aug 2023 18:04:31 +0200