simplify remove_mat_var

make the argument a boolean rather than a function to decide whether to
raise Bind or to re-raise the original. this makes it more transparent
in the proofs that these are the only things it's going to do.
update pmatchTheory for new exceptions