Removed race condition from libevent based poll implementation.
Removed race condition from libevent based poll implementation.

Under certains circumstances, the future returned by poll is discarded
right after the event is triggered, this causes the event callback to be
called before the discard callback which results in an abort signal
being raised by the libevent library.

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

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