Don't set/reset g_stop in stop_threads, that can race with the monitor
thread's sample rate, and turn off monitoring between the populate and
worker phases.
Be more aggressive about stopping runs that are failing, have thread
functions that are setting g_error also set g_stop, there's no reason
to keep the checkpoint thread running once a worker has failed.  I'm
pretty sure this isn't a bug fix, but it's a simpler approach and
means it doesn't matter what order things fail in or if worker loops
are checking g_error or g_stop.