Move to Encode()/Decode() API and remove internal buffers

This patch removes all the internal buffering required for the streaming
API and exposes only Encode() and Decode() routines.  This fixes at
least two bugs where buffer-overruns where happening, and also another
bug where we were flushing too much data to the output.  Moving to raw
arrays also increases encoder performance from 20x slower than snappy to
2.5x-4.5x slower.

The decoder now nicely reports "corrupt input" most of the time, but
could probably use a bit more fuzzing to make sure it's robust against
bad input.

The lz4-example program has been updated for the new API and also
includes profiling options.

For compatibility with lz4, we now correctly complain about too large
inputs (0x7E000000 bytes) and expose a routine to calculate the maximum
expansion rate for a given block:  (i.e., given a block 'src', how large
could it become if we fail to compress it but still have it run through
the encoding process.)
Merge pull request #4 from dgryski/buffering-rework

Replace streaming API with block encode/decode routines