RFC: Retrying failed tests

@gabrielfalcao: I'd appreciate some thoughts on if this is roughly the right direction for this feature. If so, I'll improve the code (and write tests!).


Cheers,

Dan