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