log: start using file cache

This patch modifies the log to use the file cache. New WAL segments are
opened through the cache from the moment we switch to them, meaning
there's a short period of time as they're being preallocated where they're
opened outside the cache. Log index chunks are only used through the cache.

The bulk of the patch is plumbing to get the file cache down from the server
into the various log classes. Most "interesting" log-related tests have been
modified to instantiate a cache while other unit tests have not, ensuring a
mix of test coverage.

One important semantic change to be aware of: it is now unsafe to delete a
log's data or bootstrap a new copy of an existing tablet without first
closing the old log. Thankfully we only took advantage of this in tests.

I added a new gflag to use as a feature flag, in case things go south.

Change-Id: I2c00f6b839a693e059fa2ce79abf347dbf83bdd0
Reviewed-on: http://gerrit.cloudera.org:8080/15082
Tested-by: Adar Dembo <adar@cloudera.com>
Reviewed-by: Andrew Wong <awong@cloudera.com>
31 files changed