CMake:
- fix test LIBELF_LARGEFILE (includes and libraries for test were not set)
- fix test for librt (clock_gettime is optional, not required)
- disable test ELF_GETSHDRSTRNDX (not needed)
- remove libresolv on SunOS (not needed)
- test existence of required headers