posix: use STD*_FILENO constants

Rather than "magic" numbers, use meaningful constant names provided by
unistd.h.