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.

Buffer should only be done in kernel space. 

In kernel space, OS's page cache will buffer any incoming writes until you fsync on the file or until the flusher thread kicks in. There is no point buffering them in user space unless you want to speed up the reads for buffered data.