Prevented a race when relinking with SSL downgrade enabled.
Prevented a race when relinking with SSL downgrade enabled.

If there are two or more actors, on the same OS process, that try to
relink at the same time, there is a potential CHECK failure when SSL
downgrade is also enabled.  The following interleaving is problematic:
|             Actor A             |             Actor B             |
|---------------------------------+---------------------------------|
|        Starts to relink.        |        Starts to relink.        |
|        Creates socket A.        |                                 |
|   Replaces link with Socket A.  |                                 |
| Tries to connect with Socket A. |                                 |
|                                 |        Creates socket B.        |
|  Connection fails due to SSL.   |   Replaces link with Socket B.  |
|     Attempts to downgrade.      |                                 |
|     Tries to replace link.      |                                 |
The last step in the interleaving fails because we assert that the
socket we are swapping out exists in the `SocketManager`s state.

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

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