The fold_file_loop function had a bug (a misoptimization, really) that
caused it to fail to fold over files that were exact multiples of the
chunk size the outside fold was using to iterate with.  In addition to
the misoptimization, this also goes afainst POSIX semantics by
treating short reads as an exceptional case, rather than something
that can happen at any read.

The fix makes each of the inner fold functions check all matches for
potential end of input.  The outer fold never tries to guess, but
reads until the inner fold says it is done, or eof is reached. I was
worried that this would cause a performance problem, but the perf
testing scripts show no or negligible impact.
the refactoring in the prior commit caused the hintfile CRC check to
be moved from one loop to another, this adds a test to make sure that
the expected behavior is seen.
Merge pull request #173 from basho/metafold-fwd-port

forward port of fix for fold_file_loop

Reviewed-by: slfritchie