Fix #2810.

Previously, auto_reconnector_t assumed that the directory was
always in sync with the set of currently connected peers, so that
a disconnected peer never appeared in the directory. This
assumpion is not correct, and in certain rare circumstances this
would cause the server to crash. This commit fixes the problem.
Merge branch 'tim_2810' into next