With proxy Fast Open, Connect() can complete before the CONNECT
response arrives; the response then ran through OnIOComplete() into the
DoLoop() STATE_PROCESS_RESPONSE_CODE fastopen block, which force-returned
ERR_IO_PENDING. An async header-read failure left the consumed connect
callback to be run with an error (DCHECK in debug, null run in release),
and a pending application read was never completed.
Track the pending header read with std::optional<bool>
read_headers_pending_ (nullopt until Fast Open engages, false once the
read completes) and clear it in OnReadResponseHeadersComplete(). Remove
the STATE_PROCESS_RESPONSE_CODE block and handle the response result in
OnIOComplete(): on failure transition to STATE_DISCONNECTED and complete
a pending application read with the actual error; on success leave the
pending read to the data path.