retryWhen/repeatWhen

Rebase and clean up of #1326 while Aaron is at LambdaJam.
Aaron and I where changing things so frequently that it was just easier to have all the logic in one place.  Now that things have settled I can sift some back.