systemc: Detach child events in the Object destructor.

This way they don't try to detach themselves from a parent object which
no longer exists.

Change-Id: Id4a3f3b2241cf8c67cae9b983bd4c1acbef083e3
Reviewed-on: https://gem5-review.googlesource.com/c/13301
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
3 files changed