stbt-record: Replace multiple wait_for_matches with a press_until_match

If the user presses the same remote control key multiple times, then
insert a single 'press_until_match' call to the output file instead of
multiple 'press' and 'wait_for_match' calls; and save a single template
image after the last keypress.