Benjamin Dumke-von der Ehe's LockableStorage, as described on http://balpha.de/2012/03/javascript-concurrency-and-locking-the-html5-localstorage/