Remove unnecessary hashmap lookups.
Remove unnecessary hashmap lookups.

In a number of places, we tested whether the slaves hashmap contains
the desired element before indexing it. It is safe to just index it and
check for a NULL result, which saves us some hashing and lookups.

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

verizonlabs/mesos,chhsia0/mesos,chhsia0/mesos,reneploetz/mesos,zmalik/mesos,jpeach/mesos,reneploetz/mesos,abudnik/mesos,abudnik/mesos,zmalik/mesos,kaysoky/mesos,zmalik/mesos,andschwa/mesos,gsantovena/mesos,gsantovena/mesos,Gilbert88/mesos,reneploetz/mesos,andschwa/mesos,Gilbert88/mesos,Gilbert88/mesos,Gilbert88/mesos,chhsia0/mesos,jpeach/mesos,dforsyth/mesos,asamerh4/mesos,reneploetz/mesos,dforsyth/mesos,asamerh4/mesos,chhsia0/mesos,Gilbert88/mesos,verizonlabs/mesos,gsantovena/mesos,dforsyth/mesos,zmalik/mesos,kaysoky/mesos,andschwa/mesos,neilconway/mesos,dforsyth/mesos,chhsia0/mesos,kaysoky/mesos,andschwa/mesos,abudnik/mesos,neilconway/mesos,abudnik/mesos,reneploetz/mesos,gsantovena/mesos,reneploetz/mesos,kaysoky/mesos,verizonlabs/mesos,andschwa/mesos,asamerh4/mesos,jpeach/mesos,chhsia0/mesos,dforsyth/mesos,verizonlabs/mesos,zmalik/mesos,jpeach/mesos,gsantovena/mesos,Gilbert88/mesos,andschwa/mesos,zmalik/mesos,neilconway/mesos,kaysoky/mesos,gsantovena/mesos,zmalik/mesos,neilconway/mesos,gsantovena/mesos,neilconway/mesos,dforsyth/mesos,dforsyth/mesos,asamerh4/mesos,verizonlabs/mesos,verizonlabs/mesos,reneploetz/mesos,kaysoky/mesos,abudnik/mesos,abudnik/mesos,neilconway/mesos,verizonlabs/mesos,kaysoky/mesos,asamerh4/mesos,chhsia0/mesos,neilconway/mesos,abudnik/mesos,jpeach/mesos,jpeach/mesos,Gilbert88/mesos,asamerh4/mesos,andschwa/mesos,jpeach/mesos,asamerh4/mesos