Implementation of TVar

This is an initial implementation of a transactional memory, as in Haskell or Clojure. It demonstrates the API, but currently uses a single global lock. I will implement a proper concurrent implementation, probably *two-phase locking with versioned locks*, later.

Not ready to be pulled yet - here for comment and review. Don't worry too much about implementation details - they'll change but the API will be roughly the same.