Bugfix in Derivative.cpp

Scope was being popped when it wasn't pushed.
Prevent combinatorial code explosion during allocation bounds inference.
Allow undefined bounds expressions through the is-simple-enough check
Debugging code cleanup
Simplification rules for min(a/4, b/4) and similar
Skip stages tries to keep the predicate slightly simpler as it goes.