.Seq module in FOTerm and FOFormula to iterate on subterms, vars, symbols, etc. in
a more general and composable way;
subsequently modified several functions to use those iterators