Fix race condition in process.cpp.
Fix race condition in process.cpp.

Fix race condition between encoder creation and io::poll in
SocketManager::Send(Message).

Review: https://reviews.apache.org/r/27956

gsantovena/mesos,asamerh4/mesos,dforsyth/mesos,craimbert/mesos,Aman-Jain-14/customizedMesos,abudnik/mesos,verizonlabs/mesos,reneploetz/mesos,craimbert/mesos,jpeach/mesos,kaysoky/mesos,abudnik/mesos,jpeach/mesos,Gilbert88/mesos,yuquanshan/customizedMesos,Aman-Jain-14/customizedMesos,abudnik/mesos,chhsia0/mesos,gsantovena/mesos,neilconway/mesos,zmalik/mesos,asamerh4/mesos,Gilbert88/mesos,jpeach/mesos,Gilbert88/mesos,chhsia0/mesos,gsantovena/mesos,kaysoky/mesos,dforsyth/mesos,craimbert/mesos,dforsyth/mesos,yuquanshan/customizedMesos,andschwa/mesos,abudnik/mesos,reneploetz/mesos,dforsyth/mesos,yuquanshan/customizedMesos,craimbert/mesos,jpeach/mesos,zmalik/mesos,andschwa/mesos,neilconway/mesos,zmalik/mesos,verizonlabs/mesos,Aman-Jain-14/customizedMesos,verizonlabs/mesos,andschwa/mesos,reneploetz/mesos,verizonlabs/mesos,abudnik/mesos,jpeach/mesos,reneploetz/mesos,Gilbert88/mesos,gsantovena/mesos,jpeach/mesos,verizonlabs/mesos,andschwa/mesos,verizonlabs/mesos,craimbert/mesos,zmalik/mesos,chhsia0/mesos,gsantovena/mesos,reneploetz/mesos,jpeach/mesos,andschwa/mesos,gsantovena/mesos,asamerh4/mesos,dforsyth/mesos,kaysoky/mesos,Aman-Jain-14/customizedMesos,abudnik/mesos,zmalik/mesos,yuquanshan/customizedMesos,kaysoky/mesos,verizonlabs/mesos,yuquanshan/customizedMesos,chhsia0/mesos,kaysoky/mesos,chhsia0/mesos,zmalik/mesos,kaysoky/mesos,craimbert/mesos,chhsia0/mesos,neilconway/mesos,neilconway/mesos,Aman-Jain-14/customizedMesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,craimbert/mesos,neilconway/mesos,abudnik/mesos,reneploetz/mesos,Gilbert88/mesos,zmalik/mesos,asamerh4/mesos,reneploetz/mesos,asamerh4/mesos,dforsyth/mesos,neilconway/mesos,Gilbert88/mesos,Aman-Jain-14/customizedMesos,yuquanshan/customizedMesos,andschwa/mesos,chhsia0/mesos,kaysoky/mesos,gsantovena/mesos,neilconway/mesos,Gilbert88/mesos,asamerh4/mesos,dforsyth/mesos,andschwa/mesos,asamerh4/mesos