[Cronet] Check whether request is done before spinning up message loop
When client writes to OutputStream, the request might have already completed.
If that is the case, do not spin up the message loop since that will block
the calling thread forever.
This CL also adds tests.
TBR=mef@chromium.org
BUG=
626653
NOTRY=true
NOPRESUBMIT=true
Review-Url:
https://codereview.chromium.org/2131323002
Cr-Commit-Position: refs/heads/master@{#404652}
(cherry picked from commit b08d71cee8ab485bc4bf6872d01be9fe8b4df296)