Fix compilation of QtTest on Linux systems with old kernel headers

Hardcode our perf_event_open(2) function to simply return -1 and set
errno to ENOSYS. This will disable the functionality.

People compiling Qt with such old headers will probably carry quite a
bit of dead code in QtTest. They should upgrade.

Task-number: QTBUG-32507
Change-Id: I774b4a81bee5c3e2ddc75fa52520d123a6bebed9
Reviewed-by: Jason McDonald <macadder1@gmail.com>