Fix buffer overrun error with some proxy servers

In some cases, depending on the proxy server response, the current
implementation of QHttpSocketEngine may write to memory beyond the
allocated buffer size. That will trigger undefined behavior on UNIX
systems and a buffer overrun exception if compiled with visual studio.

Change-Id: I5769d10c56b6a7483d6d94672aa4321287b82651
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Improve dbus cross compilation

Building QtDBus on Linux host for QNX target had two issues:
* Configure check failed, because dbus-1 library was not linked in,
  if target platform doesn't support pkg-config.
* Host tools were not built, because pkg-config was not used to locate
  dbus headers on the host.

Task-number: QTBUG-37324
Change-Id: I71d8309599fd40ef2dd8c9e3b44b93a7482019f1
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>