Introduce the 'NopStore', which is a sorta-ChunkStore that throws away
all written data. Get() can't really be called on it, as a result,
but it's useful for taking IO totally out of the equation when testing
our code for performance.
Towards issue #67
1) Get rid of temp file usage in FileStore. Instead, write to a buffer and then
dump to disk on Close().
2) Chk.Equals() uses reflection even if you call it on primitive types, which
can be surprisingly costly. Switch to a Chk.True() in a couple of hot paths.
I incorrectly said this was already true in a previous patch, so
make it true now!
Also, updated file_store_test.go and s3_store_test.go to use stretchr
testify suites so they can share setup and teardown code.
Fixes issue #5 as well
In both FileStore and S3Store, the behavior of calling Ref() twice, or of
calling Ref() after Close() was undefined and probably crashy. After this,
the semantics are as follows:
Once either Ref() or Close() is called, you can't Write() any more.
Ref() can be called any number of times
Close() can be called any number of times
Ref() and Close() can be called in any order.
Addresses issue #6
This is in preparation for renaming the 'Commit' abstraction to
DataStore. So we will essentially have a 'chunkstore' abstraction
and a 'datastore' abstraction.