Fix use of the close system call.
When close returns, it guarantees that the file descriptor given will
be closed, even if it fails. (The documentation is extremely poor,
but this is what every operating system does.) Consequently, it is a
bug to retry close. Every use now either ignores the return value of
close or takes a specific action based on it; it is incorrect to use
STD_VOID_SYSTEM_CALL with close.
Some calls that ignore the return value really need to check for
EINTR and deliver pending interrupts, but I'll get to that later.