Replace a number of stdint variables with standard C types.

uint8_t sticks around for raw data, and u/int64_t is for big values,
but most everything else works as ints/unsigneds.
Fix FLAC subframe header error handling bug.
Numerous minor overhauls to low-level bitstream library.

The hope is to simplify it and get its pieces to interoperate more cleanly.
Split some of bitstream's internal routines into their own files.

This makes it a lot easier to follow how the BitstreamReader/Writer
methods interact with the stdio-like functions
for buffer/external function reading/writing.
Fixes to get the standalone test programs to build.