Change return values for rarch_main_iterate and do_state_checks