[klibc] Fold fopen and fdopen

Fold common features of fopen() and fdopen().  In particular,
POSIX doesn't actually require that fdopen() modifies the flags
on the file descriptor, so *don't* -- this is klibc, after all.

With that, we can then remove __fxopen() and __parse_open_mode() and
fold them into fdopen() and fopen() respectively.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
6 files changed