added session_iter_test

also added inferior_{pre,post} callbacks to run_exit_test and
tested that the order of the callbacks is as expected