Cleaned up `strings::tokenize` and `strings::split`.
Cleaned up `strings::tokenize` and `strings::split`.

The previous coding used a `while` loop condition that was invariant
over the body of the loop; it is clearer to write this as an `if`
statement instead. Also clarified comments.

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

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