Fix a check in database shutdown or Column family drop during flush.
Fix a check in database shutdown or Column family drop during flush.

Summary:
Fix a check in database shutdown or Column family drop during flush.

Special thanks to Maurice Barnum who spots the problem :)

Test Plan: db_test

Reviewers: ljin, igor, sdong

Reviewed By: sdong

Subscribers: leveldb

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

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