add log abstraction to store records in disk

@xiangli-cmu 
This adds _log_ and _message_ abstraction.
I haven't thought about how to batch encoding yet. It had better be considered in snapshotting.

How about we don't buffer stuff until we know there is a performance issue without buffering? : ) The code will be much simpler.