The network_moved check in DoHandshakeLoop and calling OnHandshakeIOComplete in Send/Recv IO completion callbacks should only apply to STATE_HANDSHAKE
The network_moved check in DoHandshakeLoop and calling OnHandshakeIOComplete
in Send/Recv IO completion callbacks should only apply to STATE_HANDSHAKE

After transport I/O completes synchronously, stay in the handshake
loop only if the next state is STATE_HANDSHAKE, which is the only
state that requires transport I/O to make progress and the only state
that allow us to call OnHandshakeIOComplete in Send/Recv IO completion
callbacks.
The change is mainly from http://codereview.chromium.org/9172005.

BUG=109706
BUG=net_unittests::SSLClientSocketTest.*, should not be hung when running those tests.

Review URL: http://codereview.chromium.org/9138010

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@118626 0039d316-1c4b-4281-b951-d872f2087c98

yitian134/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium