Backport 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.

(cherry picked from commit c13350fcc589ba1056a425d009e250321442e1c5)