improve socket mocking to hopefully pass both new python3.4 socket connection stuff and requests tests