libthreads: perform 'model checking' when moving to next thread