Importing existing code

This version works and has been tested only on single-processor
machines. Testing it on SMP would probably be nice, but all omegaUp
runners are single-processor. Plus, adding memory barriers decreases
performance significantly, so you still want to set the affinity of all
processes that use a transactfd to run on a single processor to avoid
that overhead.