Fix compilation of qserialport auto-test with Qt4

In qt4 the macro QCOMPARE can not make type cast between "int" and
"qint64", though on qt5 there are no problems.

Tested build on Lixux 64bit with Qt4 and then Qt5.

Change-Id: I258f8ee4d26b65cc81720d66714ef69df23e7266
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Inspect lock file to determine busy state.

QSPI was relying on QLockFile.isLocked() to determine if the port
was in use. This was due to a misunderstanding of the QLockFile
class design.

Ideally the code in QSPI.isBusy() should be moved into a new method,
QLockFile.available(), since it contains implementation details of
that class.

Note that isBusy() is for information purposes only, since checking
for a lock without obtaining it is always racy.

Change-Id: I675bd4033e4228e6bf864bf2e7a00a2520ccc50e
Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>