fixing infinite loops in socketIO

        - copying stevie's fixes for infinite loops in socketIO
        - both read and write can loop forever, this is a sanity check for that
Add error checks and remove the now unnecessary timeout check

- explicitly check for a read failure and null socket
- remove the timeout check we added since we shouldn't need it anymore and it makes the code uglier
make this exception throw look like similar lines elswhere in the file
Merge branch 'kp/fix-socketIO-timeout-issues' of git://github.com/Pardot/php-amqplib into Pardot-kp/fix-socketIO-timeout-issues