Optimized reversed-range call when constants are inside of the range.

Please see my final comment on #346, as I also tested the optimization for variables with `IntNode` and that works as well. Hopefully that fits in well enough.

Partial work on ticket #765.

Happy Holidays!