Modifies `cleanup` so that it takes (1) an array of additional fvarids
to preserve and (2) a flag to control whether to include indirect
propositions.
(This is wanted in mathlib for the `extract_goal` tactic.)
They are all in `MetaM`.
These are helper functions for issue #1237. We need to "cleanup" the
local context before trying to compile the match-expression.
see issue #1237