Made timeout threshold a configuration option.

The default is zero for deactivating timeout. Now it is possible to
discern infinite simulations from heavy server load, but needs further
checking.