Iterate over '$scope.state.slaves/.frameworks' only once when updating state in the WebUI.
Iterate over '$scope.state.slaves/.frameworks' only once when
updating state in the WebUI.

The current implementation iterates over 'slaves' and 'frameworks'
twice: the first time to copy the state and the second time to
calculate statistics about that state. The iterations can be
collapsed into one without changing any functionality.

From: Ross Allen <896da735a0f17bcd162429d5d14d11092bc798d0@mesosphe.re>
Review: https://reviews.apache.org/r/12741

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