Add cmake platform checks

- Created a cmake/PlatformChecks.cmake to hold the checkes
- Added a check for mkdtemp
- Defined CMake checks for all headers in config.h.in
- Removed headers checks that are not used anymore:
  sgtty.h sys/statfs.h libintl.h poll.h
- For sys/wait.h I've added a fatal error if it is not
  found on UNIX
- Added UNIX check
- Also check for setenv() and fail if it does not exist
  since our os layer just assumes it does
Add cmake platform checks [2]

- Replaced nearly all defines in config.h.in for functions with
  compile time checks
- Fail if lstat is not present since os_unix.c requires it
- Removed entries for functions that are not being used: getcwd,
  getrlimit, getwd, nanosleep, sigaltstack, getwd, sigstack, fseeko
- Add check for symbol FD_CLOEXEC
Remove USEMEMMOVE from config.h.in
Fix CMake checks for iconv

- This commit does not enable iconv usage, it is still off by default,
  but we should now be able to turn it on by setting USE_ICONV
- HAVE_ICONV_H and HAVE_ICONV hold the expected checks but Neovim uses
  USE_ICONV define to actually decide whether to enable it
Removed checks for select.h and sys/select.h

- Removed HAVE_SELECT, HAVE_SYS_SELECT and SYS_SELECT_WITH_SYS_TIME
  from config.h.in
- Removed include for sys/select.h from vim.h
Fixed old TODOS in config.h.in

- Add cmake check for stropts.h
- Removed TODO for sysconf.h and sys/sysinfo.h