CMake support: avoid infinite loop on foreach(RANGE) that never runs.
foreach(i RANGE 10 1) never runs because start > end. The project visitor
was returning an incorrect 'lines' value when handling those, making walk()
jump *backwards* to near beginning of file, instead of forwards to the
matching endforeach. This would probably cause an infinite loop, since it
would process the same loop again.
This commit makes the project visitor handle empty RANGE loops the same as
empty normal foreach loops, skipping to the matching endforeach. It also
adds a new test for this problem.
BUG:253513