Make the nested AsyncEvent work more reliably
We must take into consideration that somebody might hold on to a hard
reference to such an object. Thus it is not enough to drop the
references to it from its parent, that is not necessarily enough to
make it destruct. Instead have the parent explicitly cann a function
on the children than generates their end events.
Also add some documentation.
Change-Id: I38180c85072c76af8964c48fa19132b8e1178ee1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114813
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>