Abstracted the Retry Policy logic to allow for custom policies.

As per the discussion on the mailing list this patch is an attempt to abstract retry policies so users can create custom logic to retry a query.
At the risk of sounding pedantic, I don't think you should use the word just :-)