Fixed bug in dire.control.Reactor

The reactor didn't check right after startup whether it should
already shutdown again. This could lead to a situation where
constant signals that met the abort condition already with
the initial value but never fired an event to the Reactor, would
run forever.

This commit changed the behavior so that the Reactor checks
after startup and after each processed event whether it is time
to shutdown.
Prevent deadlocks in tests using thread pools

Tests using thread pools (that is almost all tests in dire)
have a tendency to deadlock if the number of threads created or
used exceeded the number of cores of the system the tests are
running on.

This fix in Build.scala might solve this issue although I will have
to test it on several machines.
added tests for dire.test.TestFunctions