Avoid questions that simplify too much

Prevent things like #49447
Also add some useful functions for factoring and dividing expressions by expressions which should be useful later.