Fix how we decide which socket options to use

Add tests for three different branches of logic. Remove tests from
test/test_connectionpool.py since all tests for socket_options require a
dummy_server.