Pass the HAVE_QT* flags through the config header, like all others.

I don't know why it didn't work for the original author, but it definitely
works now.
Extended the CPU/GPU selection mechanism in performance tests.

Now it allows choosing between arbitrary implementation variants.
Made perf tests record module name, selected implementation and number of threads.
Added an option to print available implementation variants.
Disabled the cuda variant when CUDA is not available.
Changed the impls argument to be an array name.

Turns out, you can't use preprocessor directives inside macro arguments.
Who'd have thought?
Merge pull request #1029 from SpecLad:have-qt-config
Merge pull request #1030 from SpecLad:ts-impl-variants