Created new threaded branch

Threaded code is currently working as long as there is only one
optimizer (i.e. no actual threads): various locking code is still needed
before eris threads actually works, hence the branch.