Merge CouchDB's idea of data_size

This paches dbcore to include the CouchDB notion of data sizes which is
defined as the size of all live data in a database file. This number is
useful for deciding when to compact databases.

Technically speaking this measure is lacking a bit of information
because it does not currently account for headers, security objects, or
purged document information.

The new sizes are named slightly differently than either the CouchDB
version or the Cloudant version. The new names are:

     file - Total number of bytes in the file
     active - Active bytes in the current MVCC snapshot
     external - Theoretical bytes to store user data uncompressed

BugzId: 27061

N.B. Heavily modified by rnewson for the merge, credit him if it works, blame
davisp if it doesn't. thanks.
4 files changed
tree: 9e8b56f7339e26f551e7ff33f4440772cfea9c7b
  1. include/
  2. priv/
  3. src/
  4. .gitignore
  5. rebar.config.script