test_stbt_motiondetect_*: Fix intermittent failures on heavily-loaded systems
test_stbt_motiondetect_*: Fix intermittent failures on heavily-loaded systems

On a heavily loaded system, the timeout in `run_motiondetect` was
kicking in before the `stbt-templatematch` GStreamer element had
processed any frames. This problem started to manifest since we run the
unit tests in parallel (see commit 42d1d8aa).

Now we use videotestsrc's `num-buffers` property so that the
`gst-launch` command exits after a certain number of frames have been
processed.

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