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.