Fast, atomic persistent storage layer on top of localstorage