Fixes bug 797770
Unfortunately if rabbit decides protocol negotiation is taking too long,
it will close the socket on us. This ends up raising IOError with a
'socket closed' message. This patch will catch IOError and re-try.
Change-Id: I9110c845b71118c0fad760d90e91c585e6db46ed