Add ability to disable socket_options

Start writing tests and fix a bug as a result
Unfortunately, I think these tests will need to be run with the dummyserver since we want to test that the socket option was set.