ported 2.4 perf tests for matchTemplate
Merge pull request #2383 from ilya-lavrenov:perf_match_template