First working implementation

Simple in-memory implementation, seems to work but needs actual
multithreaded testing. Note also that the actual performance is likely
to be bad - transactions succeed if they are the first to write the
Boxes they want to write, and retry instantly. We need some intelligent
retrying of transactions.