DRI2: Debugging code for testing the frames order correctness

If DEBUG_WITH_RGB_PATTERN is defined, then we check that the
frames colors are changed as "R -> G -> B -> R -> G -> ..."
pattern and print debugging messages when this is not the
case. Such color change pattern can be generated by the
"test/gles-rgb-cycle-demo.c" program.

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>