[Java] Temporary set the number of BG threads based on the number of BG compactions.
[Java] Temporary set the number of BG threads based on the number of BG compactions.

Summary:
Before the Java binding for Env is ready, Java developers have no way to
control the number of background threads.  This diff provides a temporary
solution where RocksDB.setMaxBackgroundCompactions() will affect the
number of background threads.

Note that once Env is ready.  Changes made in this diff should be reverted.

Test Plan:
make rocksdbjava
make jtest
make jdb_bench
java/jdb_bench.sh

Reviewers: haobo, sdong

Reviewed By: sdong

CC: leveldb

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

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