Rework and add new rules for simplifying ramp/x and ramp%x

Fixes issue #458 

I'd appreciate another set of eyes, because these rules are pretty nuts. They should be tested by the test cases at the bottom, and also by the simplify fuzz-tester.
Looking through the uses of is_simple_const in this file, I think we lost quite a few rules with this change. For example, the bounds inference based rule for Min (line 926). I think the specialize branched loops work specifically needed this rule. I think this change is correct, but I also think we may need to be more precise with our usage of is_simple_const elsewhere in the file. 

I think we should consider renaming is_simple_const to "is_foldable_const", and then try to be more precise about the const-ness tests used in the simplifier.