perf tools: Introduce set_term_quiet_input helper function