Merge pull request #83 from cockroachdb/spencerkimball/concurrency-anomalies

A test framework for verifying concurrency anomalies
Add ApproximateSize() method to Engine

Commit adds ApproximateSize() method on the Engine interface, designed to
utilize the GetApproximateSize() method of the rocksdb engine.

+ Implemented in both rocksdb and inMem Engine structs
+ Adds compression-aware test for the method.
Merge pull request #96 from cockroachdb/mtracy/approximate_size

Add ApproximateSize() method to Engine
Add engine.Key.Address() method for addressing local keys.

Local keys are keys which are located on the same range as other keys
minus a local key prefix. Local key prefixes take the form:
"\x00\x00\x00[4 characters]". Any commands addressed to keys of this
form are direct to the range containing the same key minus the prefix.
Transaction records, response cache entries, range metadata (and
in the future others) all have local keys.

Changed cases where we write directly to the underlying engine to use
binary-encoded keys. Now that we binary encode all keys, need to pass
correct prefixes to the C++ custom compaction filter for GC. In this
way, we avoid having C++ need implementations of our decoding methods.

Moved a number of methods into methods of struct engine.Key. Added
associated unittests.