Checker: Refactor line-matching algorithm

Refactor Checker's algorithm which matches statements against
C1visualizer output. Evaluation of DAG and NOT statements previously
relied on statements which need to be evaluated in the same scope
to be adjacent in the Checker test source code. This refactoring
lifts this constraint in anticipation of adding control-flow
statements which will break up the DAG/NOT groups.

Credits: this patch was originally written by David Brazdil
(dbrazdil@google.com) and remained practically untouched.

Author:    Fabio Rinaldi
Committer: Artem Serov

Bug: 147876827
Test: art/tools/checker/run_unit_tests.py
Change-Id: I9b00aca2cba9db74ff1b6e3f202ca21b41c0838e
2 files changed