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

Fixes issue #458
Fix infinite loop found with fuzz_simplify

ramp(cast(intimm), ...) was treated as a simple_const
Merge pull request #496 from halide/ramp_div_mod_simplify_rules

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