Refactor LogStorage to more cleanly separate replay and write-behind modes, and
require explicit implementation of mutate operations.

There are a few nice things falling out of this refactor:
- New methods on mutable store interfaces are not implicitly forwarded
  (ForwardingStore does not implement mutable stores).
- Write ahead/behind behavior is more obvious in LogStorage
  (i found the delegation by calling super tough to catch mistakes.)
- Callers with a handle on LogStorage don't have a means to invoke mutate calls
  outside of a transaction (they only get access to mutable stores in write(),
  which obviated testMutateRequiresWriteOperation)

Reviewed at https://reviews.apache.org/r/18487/
Fix bash here-document warning.

Reviewed at https://reviews.apache.org/r/19245/