Restrict the use of ConstantFolding's VisitIf

It was taking a lot of time for the improvement it got. We can get
99.99% of the improvement, with only one VisitIf call. This is
roughly 20% of the compile time it used to take.

Bug: 278626992
Fixes: 278626992
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: Icc00c9ad6a9eb4f4fd18677bcb65655cbbe9d027
10 files changed