Fix race condition in d-lay

By using a lock, we avoid the race condition between
@memory and swap! in d-lay.

Used Jozef Wagner's advice at
http://dev.clojure.org/jira/browse/CMEMOIZE-8