Pass current retry number to action.

Instead of retrying plain monadic actions `m a` pass instead the current
retry number to this action. This allows it to react differently
depending on the number of iterations. Actions can resort to `const` if
they prefer to be ignorant of this additional information.