Reify socket errors into APIConnectionError's

Evidently I never pushed/proposed this.

Fixes a regression where we'd leak `SocketError`s during preflighting.

r? @ab