VersionBuilder to use unordered set and map to store added and deleted files
VersionBuilder to use unordered set and map to store added and deleted files

Summary: Set operations in VerisonBuilder is shown as a performance bottleneck of restarting DB when there are lots of files. Make both of added_files and deleted_files use unordered set or map. Only when adding the files, sort the added files.

Test Plan: make all check

Reviewers: yhchiang, rven, igor

Reviewed By: igor

Subscribers: hermanlee4, leveldb, dhruba, ljin

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

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