This change modifies the Ruby connection class to use IO#read_nonblock and IO#select to make it time out when it is supposed to time out. The previous implementation relied on raw socket timeouts, which don't work for MRI 1.9. The use of IO#select is a little slower, but fixes read timeouts. Connect timeouts are also enforced using IO#select in this patch. Inspiration for the dual socket implementation was drawn from the `dalli` gem by Mike Perham.