Don't retry queries on connections holding global locks
Ref T10860. Currently, if we lose a connection that is holding a MySQL global lock, we may retry the query automatically.
Instead, we should abort, just like we do if we were in the middle of a transaction. Otherwise, code may still think it has the lock and do unsafe things.
Test Plan: See next revision.
Reviewed By: chad
Maniphest Tasks: T10860
Differential Revision: https://secure.phabricator.com/D15789