[RocksDB] Replace iterator based loop with range based loop for stl containers
[RocksDB] Replace iterator based loop with range based loop for stl containers

Summary:
As title.
Code is shorter and cleaner
See https://our.dev.facebook.com/intern/tasks/?t=2233981

Test Plan: make check

Reviewers: dhruba, heyongqiang

Reviewed By: dhruba

CC: leveldb, zshao

Differential Revision: https://reviews.facebook.net/D9789

lgscofield/rocksdb,dkorolev/rocksdb,tschottdorf/rocksdb,biddyweb/rocksdb,hobinyoon/rocksdb,vashstorm/rocksdb,wat-ze-hex/rocksdb,biddyweb/rocksdb,skunkwerks/rocksdb,fengshao0907/rocksdb,rDSN-Projects/rocksdb.replicated,OverlordQ/rocksdb,jalexanderqed/rocksdb,IMCG/RcoksDB,mbarbon/rocksdb,alihalabyah/rocksdb,Vaisman/rocksdb,luckywhu/rocksdb,ryneli/rocksdb,tsheasha/rocksdb,lgscofield/rocksdb,NickCis/rocksdb,biddyweb/rocksdb,tsheasha/rocksdb,siddhartharay007/rocksdb,wenduo/rocksdb,mbarbon/rocksdb,hobinyoon/rocksdb,geraldoandradee/rocksdb,JackLian/rocksdb,amyvmiwei/rocksdb,facebook/rocksdb,tizzybec/rocksdb,facebook/rocksdb,mbarbon/rocksdb,wenduo/rocksdb,temicai/rocksdb,JackLian/rocksdb,skunkwerks/rocksdb,amyvmiwei/rocksdb,tizzybec/rocksdb,NickCis/rocksdb,rDSN-Projects/rocksdb.replicated,lgscofield/rocksdb,NickCis/rocksdb,zhangpng/rocksdb,mbarbon/rocksdb,luckywhu/rocksdb,norton/rocksdb,skunkwerks/rocksdb,wlqGit/rocksdb,wenduo/rocksdb,skunkwerks/rocksdb,ylong/rocksdb,kaschaeffer/rocksdb,JoeWoo/rocksdb,virtdb/rocksdb,facebook/rocksdb,Applied-Duality/rocksdb,Vaisman/rocksdb,wskplho/rocksdb,Applied-Duality/rocksdb,msb-at-yahoo/rocksdb,lgscofield/rocksdb,geraldoandradee/rocksdb,geraldoandradee/rocksdb,SunguckLee/RocksDB,mbarbon/rocksdb,hobinyoon/rocksdb,amyvmiwei/rocksdb,siddhartharay007/rocksdb,kaschaeffer/rocksdb,flabby/rocksdb,luckywhu/rocksdb,skunkwerks/rocksdb,msb-at-yahoo/rocksdb,dkorolev/rocksdb,zhangpng/rocksdb,vmx/rocksdb,tschottdorf/rocksdb,msb-at-yahoo/rocksdb,anagav/rocksdb,amyvmiwei/rocksdb,fengshao0907/rocksdb,caijieming-baidu/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,rDSN-Projects/rocksdb.replicated,caijieming-baidu/rocksdb,vmx/rocksdb,flabby/rocksdb,RyanTech/rocksdb,rDSN-Projects/rocksdb.replicated,wat-ze-hex/rocksdb,wat-ze-hex/rocksdb,Vaisman/rocksdb,norton/rocksdb,IMCG/RcoksDB,fengshao0907/rocksdb,wenduo/rocksdb,rDSN-Projects/rocksdb.replicated,siddhartharay007/rocksdb,RyanTech/rocksdb,geraldoandradee/rocksdb,ryneli/rocksdb,wenduo/rocksdb,wenduo/rocksdb,facebook/rocksdb,JohnPJenkins/rocksdb,ylong/rocksdb,Andymic/rocksdb,sorphi/rocksdb,ylong/rocksdb,wskplho/rocksdb,geraldoandradee/rocksdb,sorphi/rocksdb,wlqGit/rocksdb,dkorolev/rocksdb,hobinyoon/rocksdb,virtdb/rocksdb,Andymic/rocksdb,jalexanderqed/rocksdb,skunkwerks/rocksdb,jalexanderqed/rocksdb,caijieming-baidu/rocksdb,anagav/rocksdb,SunguckLee/RocksDB,OverlordQ/rocksdb,temicai/rocksdb,JoeWoo/rocksdb,NickCis/rocksdb,amyvmiwei/rocksdb,lgscofield/rocksdb,NickCis/rocksdb,wat-ze-hex/rocksdb,vashstorm/rocksdb,zhangpng/rocksdb,luckywhu/rocksdb,Vaisman/rocksdb,SunguckLee/RocksDB,alihalabyah/rocksdb,IMCG/RcoksDB,anagav/rocksdb,wat-ze-hex/rocksdb,makelivedotnet/rocksdb,kaschaeffer/rocksdb,siddhartharay007/rocksdb,dkorolev/rocksdb,flabby/rocksdb,kaschaeffer/rocksdb,IMCG/RcoksDB,IMCG/RcoksDB,Applied-Duality/rocksdb,fengshao0907/rocksdb,SunguckLee/RocksDB,sorphi/rocksdb,Andymic/rocksdb,temicai/rocksdb,sorphi/rocksdb,jalexanderqed/rocksdb,JackLian/rocksdb,siddhartharay007/rocksdb,wlqGit/rocksdb,skunkwerks/rocksdb,SunguckLee/RocksDB,JoeWoo/rocksdb,OverlordQ/rocksdb,wat-ze-hex/rocksdb,zhangpng/rocksdb,norton/rocksdb,msb-at-yahoo/rocksdb,wskplho/rocksdb,hobinyoon/rocksdb,tschottdorf/rocksdb,fengshao0907/rocksdb,Applied-Duality/rocksdb,vashstorm/rocksdb,flabby/rocksdb,hobinyoon/rocksdb,siddhartharay007/rocksdb,JoeWoo/rocksdb,jalexanderqed/rocksdb,tschottdorf/rocksdb,JoeWoo/rocksdb,tizzybec/rocksdb,luckywhu/rocksdb,fengshao0907/rocksdb,mbarbon/rocksdb,wlqGit/rocksdb,sorphi/rocksdb,virtdb/rocksdb,vashstorm/rocksdb,JackLian/rocksdb,hobinyoon/rocksdb,Andymic/rocksdb,amyvmiwei/rocksdb,caijieming-baidu/rocksdb,bbiao/rocksdb,bbiao/rocksdb,wlqGit/rocksdb,alihalabyah/rocksdb,Applied-Duality/rocksdb,dkorolev/rocksdb,amyvmiwei/rocksdb,biddyweb/rocksdb,wskplho/rocksdb,geraldoandradee/rocksdb,alihalabyah/rocksdb,biddyweb/rocksdb,kaschaeffer/rocksdb,makelivedotnet/rocksdb,ryneli/rocksdb,norton/rocksdb,JohnPJenkins/rocksdb,norton/rocksdb,JoeWoo/rocksdb,makelivedotnet/rocksdb,caijieming-baidu/rocksdb,Andymic/rocksdb,makelivedotnet/rocksdb,Vaisman/rocksdb,RyanTech/rocksdb,kaschaeffer/rocksdb,luckywhu/rocksdb,wskplho/rocksdb,tizzybec/rocksdb,wat-ze-hex/rocksdb,virtdb/rocksdb,tsheasha/rocksdb,ryneli/rocksdb,ryneli/rocksdb,virtdb/rocksdb,tschottdorf/rocksdb,tschottdorf/rocksdb,vmx/rocksdb,caijieming-baidu/rocksdb,Andymic/rocksdb,makelivedotnet/rocksdb,tsheasha/rocksdb,makelivedotnet/rocksdb,wenduo/rocksdb,norton/rocksdb,wlqGit/rocksdb,jalexanderqed/rocksdb,Vaisman/rocksdb,geraldoandradee/rocksdb,tsheasha/rocksdb,bbiao/rocksdb,ylong/rocksdb,sorphi/rocksdb,OverlordQ/rocksdb,dkorolev/rocksdb,msb-at-yahoo/rocksdb,rDSN-Projects/rocksdb.replicated,wat-ze-hex/rocksdb,vashstorm/rocksdb,anagav/rocksdb,ryneli/rocksdb,rDSN-Projects/rocksdb.replicated,anagav/rocksdb,zhangpng/rocksdb,vmx/rocksdb,flabby/rocksdb,IMCG/RcoksDB,JackLian/rocksdb,virtdb/rocksdb,tsheasha/rocksdb,ylong/rocksdb,OverlordQ/rocksdb,jalexanderqed/rocksdb,Applied-Duality/rocksdb,anagav/rocksdb,fengshao0907/rocksdb,SunguckLee/RocksDB,temicai/rocksdb,norton/rocksdb,JackLian/rocksdb,Applied-Duality/rocksdb,biddyweb/rocksdb,facebook/rocksdb,JohnPJenkins/rocksdb,kaschaeffer/rocksdb,bbiao/rocksdb,luckywhu/rocksdb,norton/rocksdb,temicai/rocksdb,tsheasha/rocksdb,vmx/rocksdb,zhangpng/rocksdb,mbarbon/rocksdb,tizzybec/rocksdb,wlqGit/rocksdb,Andymic/rocksdb,lgscofield/rocksdb,wskplho/rocksdb,OverlordQ/rocksdb,hobinyoon/rocksdb,RyanTech/rocksdb,zhangpng/rocksdb,JohnPJenkins/rocksdb,vmx/rocksdb,facebook/rocksdb,makelivedotnet/rocksdb,temicai/rocksdb,RyanTech/rocksdb,bbiao/rocksdb,OverlordQ/rocksdb,wenduo/rocksdb,JackLian/rocksdb,IMCG/RcoksDB,Andymic/rocksdb,sorphi/rocksdb,JoeWoo/rocksdb,caijieming-baidu/rocksdb,wskplho/rocksdb,tizzybec/rocksdb,dkorolev/rocksdb,JohnPJenkins/rocksdb,biddyweb/rocksdb,msb-at-yahoo/rocksdb,flabby/rocksdb,JohnPJenkins/rocksdb,alihalabyah/rocksdb,anagav/rocksdb,facebook/rocksdb,virtdb/rocksdb,JohnPJenkins/rocksdb,NickCis/rocksdb,vmx/rocksdb,ylong/rocksdb,temicai/rocksdb,Vaisman/rocksdb,vashstorm/rocksdb,ylong/rocksdb,siddhartharay007/rocksdb,vmx/rocksdb,alihalabyah/rocksdb,NickCis/rocksdb,lgscofield/rocksdb,bbiao/rocksdb,bbiao/rocksdb,flabby/rocksdb,tizzybec/rocksdb,ryneli/rocksdb,bbiao/rocksdb,tsheasha/rocksdb,RyanTech/rocksdb,SunguckLee/RocksDB,vashstorm/rocksdb,alihalabyah/rocksdb,RyanTech/rocksdb