Fix a deadlock occuring when there was no load anymore in the system.
Each remaining process had nothing to compute, nor to send to their
neighbors, and were blocked waiting for an incoming message.
The fix consists in:
* adding a shared global variable total_load_running, the sum of loads
currently in the system ; and
* ensuring this variable is always up-to-date ; and
* making processes terminate if total_load_running is null.
The use of a global variable is not satisfactory, but it is good
enough for now.
It is also verified, at the end of the simulation, that
total_load_running is null.
Other important changes in this commit are:
* process::receive() now consumes all pending messages (it used to
consume only one).
* The iteration number is only incremented when there is something to
compute (load > 0.0).
Note: bookkeeping version may be broken.