Allow to chain calls to activity::Comm functions
(and the same for Exec and Io activities)
We want to write something like:
CommPtr comm = mailbox->put_async(data, 8)->set_rate(0);
Before, all these functions were returning an Activity* in the hope of
allowing such chaining, but it was failing, as most of these functions
only exist in Comm, not in Activity. This commit improves this.
It also opens a Pandora box. The method
Activity* Activity::start()
is now overriden by the method
Comm* Comm::start()
. (Comm is a subclass of Activity)
I believe that changing the return type to a subclass is OK when
overriding a method, but I'm not 100% sure. At least, both GCC and
clang seem OK with that code.