stbt: Add a new iterator method `detect_match`
stbt: Add a new iterator method `detect_match`

The iterator method `detect_match` gives access to everything returned by
stbt-templatematch.

The method wait_for_match is extracted from Display and implements its
logic using a generic method `detect_match`. This cleans up considerably
the code and makes it easier to understand what wait_for_match does.

martynjarvis/stb-tester,martynjarvis/stb-tester,LewisHaley/stb-tester,LewisHaley/stb-tester,LewisHaley/stb-tester,wmanley/stb-tester,wmanley/stb-tester,LewisHaley/stb-tester,LewisHaley/stb-tester,stb-tester/stb-tester,LewisHaley/stb-tester,stb-tester/stb-tester,stb-tester/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,martynjarvis/stb-tester,stb-tester/stb-tester,wmanley/stb-tester,LewisHaley/stb-tester,wmanley/stb-tester,wmanley/stb-tester,martynjarvis/stb-tester