rename and tweak app_to_pat etc.

they should be "to_il", and make the "should not happen" cases have the
same free variables as the other cases, to allow general theorems about
free variables to be proved.
update free_vars_exp_to_Cexp
move some helpers into patLangProof

where there is a larger list of things that don't have a proper home yet
update evaluate_pat_closed