Added oplog api & tests
renamed setSnapshot to writeSnapshot