Refactor performWriteBlock to not lock every context

This changes the save to be asyncronous per each context