Add optional simplify parameter to simplify_logic.

Specifies whether to apply recursive simplification to predicates contained
within the boolean function being simplified.