The service->characteristic->descriptor tree becomes available in Qt

At the same time this fixes bugs the following bugs:

1.) Non-readable characteristics were not visible
2.) Crashes when descriptor/characteristic values were empty
3.) QLEService::discoverServiceDetails always finished with an
UnknownError

Missing/incorrect are still service details such as included services and
the service type (which currently always defaults to primary service).

Change-Id: Id73013a3784cd3c3f632102f13f5459ab37e95a6
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Avoid one large memory allocation per read descriptor/characteristic

We directly allocate into the QByteArray which continues to manage the
memory for us.

Change-Id: I39cd314a3cc9fcfd6bcf28836e0222d6d9a4f04f
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Don't print the Java stacktrace when reaching last entry of last service

We jump out and that's it. We expect the exception in those cases.

Change-Id: I0fa1b42a0eb5893dec6f68a5353dfb5da3caa137
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Fixes for QLowEnergyController unit test on Android

It turns out mutliple connections to the sam remote device are
possible. The limitations on Linux are implementation specific. We
lift the general API limitation and document the insufficient behavior
on Linux. A bug has been filed to track this limitation.

On Android, unit tests require widgets support to run as we need a
QGuiApplication.

Change-Id: I37c487246ea6115d3441ca91a920279adbdf726e
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>