Fix some exponential behavior in the simplifier.

And add a test that it broke.
Merge pull request #470 from halide/simplifier_min_max_fix

Fix some exponential behavior in the simplifier.