systemc: Ensure sc_stop during callbacks actually stops.
systemc: Ensure sc_stop during callbacks actually stops.

Make sure calling sc_stop during the appropriate callbacks will
actually skip future action by skipping later callbacks, by flushing
the scheduler before running init (so it doesn't really do anything
but record that it's in running mode now), and schedule the stop event.

Change-Id: I5edfbceda457df88d15bfcac4d97e8578205ec5b
Reviewed-on: https://gem5-review.googlesource.com/c/12468
Reviewed-by: Gabe Black <5c8aa1266c03186393d9e7b3b4e3b14239af8201@google.com>
Maintainer: Gabe Black <5c8aa1266c03186393d9e7b3b4e3b14239af8201@google.com>

TUD-OS/gem5-dtu,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5,gem5/gem5,TUD-OS/gem5-dtu,gem5/gem5