sim: Add missing virtual destructor to GlobalSyncEvent

This missing destructor in GlobalSyncEvent was causing a compilation
error in gcc-12, thus causing the compiler-tests to fail:
https://jenkins.gem5.org/job/compiler-checks/436/

In addition a destructor was added to BaseGlobalEventTemplate. This does
not directly fix the aforementioned bug provides some additional
security.

Change-Id: Iab86d3f6d55064ba3b6a8a7cb01fb14533cce4b9
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66152
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
1 file changed