Added more precise return types.
Stop the stochastic search from generating useless expression like -(-x) or y + x (as opposed to x + y).
Added equivalence classes to the stochastic search.
The algorithm is different from the deterministic search.  There we only did it at the end, so we recursively expand everything.  Here we do it after each new expression, so we use a more efficient algorithm to avoid doing unneeded work.
Minor code cleanup.