First version incorporating thread support and demand farm template. TODO: demand templates for other skeletons map reduce loop BUGS: sometimes we get core dumps / random errors with threads too many sockets left open after execution [seems fixed by the thread libraries in recent versions of Ocaml] IN PROGRESS: the logic necessary to shut down properly a loop is tricky. In the current version, we use the packet number to do this, in *non nested loops*: - when a loop distributor gets EoS, it send EndLoop n where n is the highest packet sequence number he ever saw - when a loop condition tester sees EndLoop n, it remembers the n, and does not start shutting down (i.e. sending EoS) until it has seen at least packet n (and then, it still needs to wait for the in-loop packets to finish their journey). Notice that this mechinics is fragile: a) it may not work as well in nested loop conditions b) it may break down the day packets con be "created" or "destroyed" along the way