Pass a length of string to QString::fromWCharArray

Using of the QString::fromWCharArray() we didn't pass length of a string,
hoping that all WCHAR strings are terminated by the null-character.

But it can lead to the wrong results if the initial WCHAR string has no
null character. Therefore it is reasonable to pass length of a string to
exclude an error.

Besides, to do not break of the algorithm of string comparison it is
necessary to return not null-terminated strings. Also now there is no need
to initialize of some allocated arrays by zero values.

Tested on Windows 7/8 with the on-board, the virtual com0com, the USB FTDI
and the PL2303 serial ports, using Qt4 and then Qt5.

Change-Id: I382cf8eacf4ab4d21c54de17fcdd6b9fcfa3d02c
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>