Backport of "videotestsrc: fix race condition when clearing cached buffer" into 1.24
Backport of !6849 (merged) "videotestsrc: fix race condition when clearing cached buffer".
Commits:
- bf97b2fe videotestsrc: add mutex around cache buffer to prevent race condition