Handle the parameters of a tail-rec LabelDef in a more principled way.

In particular, we do not patch them as mutable by default, only to
re-patch them as immutable if they are not mutated. Instead, we keep
their original isMutable flag as the default, and we patch immutable
locals as mutable if they are mutated.
Fix #1148: generalize our tail-call transform to more LabelDefs.

The translation of the LabelDef and Apply of tail-recursive calls
is generalized to support arbitrary LabelDefs, as long as all
label-applies to it are performed from within its body.

In addition to being a nice generalization, this fixes #1148,
because label-defs for while loops transformed in weird ways by
scoverage now fall under this generalized transformation.
Merge pull request #1150 from sjrd/fix-crash-with-scoverage

Fix #1148: compiler crash with scoverage