JAVA-1085: Implement a pluggable retry strategy, currently applied only to queries