Stdio.File: Name space cleanups.

Multiple symbols in Stdio.File are now protected:

  * {in,out}buffer

  * ___{read,write,close,read_oob,write_oob,fs_event}_callback

  * ___id

Moved the {read,write}_callback_t types to the Stdio module proper.

Also adds a do {} while(0) wrapper to the CHECK_OPEN() macro.
Stdio.File: Added query_buffer_mode().
Stdio.File: Disconnect the old output buffer properly.
block_allocator: use Valgrind macros in the right order

When sorting the free list during ba_walk(), the Valgrind macros were
used in the wrong order. This led to spurious Valgrind warnings.