CMake: include thread lib

- add FIND_PACKAGE(Threads REQUIRED)
- fix cuda_memtest build
- prepare PIConGPU for the same dependencies