expose ScopedTerm.flags
use a flag in Formula.simplify, for memoization; makes CNF fast again on some examples