some socket error handling improvements

We're using PhpRedis in production with persistent connections.  We're running into issues where these connections will get into a bad state that takes a long time to get cleaned up.  I'm planing on revising how redis_sock->stream is managed during errors, and and this is a handful of simple issues I've found along the way.