Improve linear induction var range creation

We can now detect and remove loops that require an is_taken test e.g.

int a = 0;
for (int i = 0; i < n; i++) {
  a += 1;
}

can be turned into `if (n < 0) then 0 else n`.

Part of this logic can be reused in the future to help eliminate
BoundsCheck instructions.

Bug: 304967775
Fixes: 304967775
Test: art/test/testrunner/testrunner.py --host --64 -b --optimizing
Change-Id: I944f3408e623a0652977d4c3f72d29caf9c1f908
4 files changed