configure: detect some system calls presence with their header
This is how it must be done on meson and cleaner with autoconf as well. The API may be hidden, redirected, etc. even if it links with the given SDK (this also happens with UWP detection).
Ultimately all AC_CHECK_FUNCS/AC_REPLACE_FUNCS detection that just relies on linking should probably be updated. This has been done for meson anyway.
Extracted from !7850