Fixed a bug around handling orphaned tasks in `GET_TASKS` call.
Fixed a bug around handling orphaned tasks in `GET_TASKS` call.

We erroneously wrapped the orphaned tasks loop with the loop
for known frameworks. This means that we would append the list
of orphaned tasks multiple times per framework. If there are
no active frameworks, we won't even return any orphaned tasks.

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

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