* dir.c: Add Dir#fileno.  Refactor File#openat into Dir#open based on discussions in
    https://bugs.ruby-lang.org/issues/10181.
* io.c: Add Dir#open_file.
* configure.in: Check for dirfd().