Handle possible race condition between dumping a data set and a concurrent process deleting keys

#13 + tests + handle more races + documentation