Update fflush(3) to return success on a read-only stream.

This has small changes to what Apple uses for compliance
with SUSv3. The changes cause no secondary effects in the
gnulib tests (we pass them).

Obtained from:	Apple Inc. (Libc 997.90.3 with changes)
Reviewed by:	bde
Phabric:	D440
In "procstat -v" (VM), spell out 'FL' to 'FLAG' since there are two extra
columns available anyway.  Also left align as we tend to do for flags
fields, although you can't see that currently as the string fully fills
that available columns.

MFC after:	3 days
Sponsored by:	DARPA, AFRL
Use a correct errno in freopen.

Use EBADF instead of EINVAL when working around incorrect O_ACCMODE.

Phabric:	D442
Obtained from:	Apple Inc. (Libc 997.90.3)
Reviewed by:	jilles
MFC after:	1 week