[jit] Clean up the jit failure handling code a bit, move the the bulk of the eror handling macros into functions, unify the cleanup code at the end of mono_method_to_ir ().