Revert "Revert rubygems retry hacks to test against rubygems.org changes"

This reverts commit 8e2839f2dcfc7b5a0013bb50685e42b4719150f9.

This is a stopgap until we host our own rubygems.org mirror.