These are a few tweaks to improve the stability of our gettimeofday
startup and shutdown. Hopefully this helps with PR10651 and PR12182,
but that's not been confirmed yet.
* runtime/runtime.h: Don't include time.c here.
* translate.cxx (c_unparser::emit_common_header): Include time.c here,
only if NEEDed (so we also ensure init/kill_time will be called).
(c_unparser::emit_module_init): Change to STAP_SESSION_STOPPED for the
final cleanup efforts, especially for time.c to wrap up.
(c_unparser::emit_module_exit): Ditto.
* runtime/time.c (__stp_time_timer_callback): Use the session_state
instead of stp_timer_reregister, and continue until STOPPED.
(__stp_init_time): Don't add_timer from the IPI.
(_stp_init_time): Instead, add_timer_on each cpu here.