Improve AR connection fork safety
#31173

matthewd wants to merge matthewd:connection-fork-safety into rails:master

We do not currently have an analysis of these two commits