tree traversals take functional inputs

These functions define how to manipulate terms

new(op, *args) -> make a new term
children(term) -> list of args
op(term) -> type of term (e.g. Add, Mul)
leaf(term) -> boolean if the term is a leaf
Merge pull request #1886 from mrocklin/strategies-parametrize

tree traversals take functional inputs