Retry to fix corner cases when stopping in-progress recordings.

This change retains a small part of the previous 8116fde7 commit.  The
rest of the previous commit was obviated by the recstartts part of
commit e8a99d45.  The ideal fix will ultimately use recordedid instead
of chanid/recstartts, but that will come later.