Moved traversal algorithms to ufl.core.traversal.* and removed
slower duplicate versions of algorithms pre_traversal and
post_traversal.
Remove unused extract_duplications().
Move extract_variables to ufl2latex, the only place it's used.
Delete unused extract_indices().
Remove unused count_nodes().
Move has_type and expr_has_types to expand_indices, only place of use.
Move expr_has_terminal_types into formtransformations.py where it is only used by PartExtracter. This use should be rewritten but leaving that for another time.
Minor optimizations in traversals and object extraction.
More removal of unused utility algorithms, moved some and renamed some
to __unused__foo in case we want to use them.
Remove unused imports.
Use form.arguments() instead of extract_arguments(form) everywhere, exploiting the cache mechanism in Form to optimize repeated argument extraction.
Add missing import.