fusion of loops in Range.foreach() and Range.validateRangeBoundaries()
fusion of loops in Range.foreach() and Range.validateRangeBoundaries()

This commit allows closure elimination in more cases. The non-inlined case also benefits from saving a Range.validateRangeBoundaries() invocation.

Before this commit, the closure argument to Range.foreach() escaped to Range.validateRangeBoundaries(). As a consequence, closure elimination required inlining both of them. Given that the current optimizer duplicates a closure body whenever that closure's apply() is invoked, the resulting code size taxed the JIT compiler. In particular when apply() delegates to a specialized version, or when a bridge apply() stands in the way.

felixmulder/scala,slothspot/scala,scala/scala,felixmulder/scala,lrytz/scala,slothspot/scala,martijnhoekstra/scala,slothspot/scala,jvican/scala,lrytz/scala,scala/scala,shimib/scala,scala/scala,martijnhoekstra/scala,jvican/scala,shimib/scala,shimib/scala,jvican/scala,slothspot/scala,jvican/scala,lrytz/scala,martijnhoekstra/scala,scala/scala,felixmulder/scala,felixmulder/scala,jvican/scala,slothspot/scala,martijnhoekstra/scala,shimib/scala,jvican/scala,martijnhoekstra/scala,scala/scala,felixmulder/scala,shimib/scala,slothspot/scala,felixmulder/scala,felixmulder/scala,jvican/scala,martijnhoekstra/scala,lrytz/scala,shimib/scala,lrytz/scala,slothspot/scala,scala/scala,lrytz/scala