Fixed continuation logic in logrotate module.
Fixed continuation logic in logrotate module.

Previously the module's inner loop followed via `.then([=]`
which potentially executes the continuation on a different process.
This patch fixes this behavior (it should run on the same process)
and future-proofs this code in case the module is extended with
additional processes/behavior.

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

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