This fixes a lock order issue where ForNode() takes a lock on cs_vNodes
and locking cs_main to gather INVs within the callback trips deadlock detection,
since net_processing takes those same locks in the reverse order in another thread.
This does not suffer from the same flaw as D5692 in that it doesn't hold
an excessively long lock on cs_main. However it comes with a drawback of
gathering INVs before knowing if the peer node is still connected. I attempted
to mitigate this by making sure INVs are only gathered once. That way if one node
drops connection and another node is suitable, we don't need to take locks on cs_main twice.