Added a channel.close() to a channel unit test to prevent unclosed sockets from hanging around.
Added a sock.close call to test_stream
Added missing teardowns to a few tests to prevent the tests from hanging.
Added support for the socket.SOCK_NONBLOCK flag present in Python 3.2+ on Linux 2.6.27+.
- used tuples from the beginning, used try/except for consistency