fix (#220) ?
If an actor ends right after a dsend, the Comm should not be canceled
to let the receiver a chance to catch it.
It was removed in Comm::cancel(), now it's not, and the destructor has
to be a bit more careful.
As the comm was canceled, if the receive is posted later, it nevers
find its matching send and may stall forever or timeout.
This changed the output of the chord example (using dsend), but I
suspect it was not so correct before with some dsend being canceled
and the corresponding receive ending on timeout.
This also highlighted an issue in Java. The cleanup function for dsend
is now called at the end of the simulation and get_current_thread_env
crashed (because the current thread is maestro).
Hopefully, this commit does not cause new leaks.