basic mvcc

@xiangli-cmu 
I don't' think this works with multithreading, you should consider using atomic operation instead.