Correctly decrement thread usage counter after scanner thread exit

Change-Id: I9bb2a4766904dc73b8433cdffc53c23b32459280
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2033
Reviewed-by: Alex Behm <alex.behm@cloudera.com>
Reviewed-by: Nong Li <nong@cloudera.com>
Tested-by: Henry Robinson <henry@cloudera.com>
(cherry picked from commit 5121e4d57bac3d343e989c49e69904ea9a90e376)
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2061
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins
Few RM changes

* Allow destructor to exit quickly if vcore acquisition thread is in RPC
* Allow for optional default resource estimates for queries (for RM only)
* Add Yarn-site suitable for local testing

Change-Id: I93e46477ad05bd3150adfa7d324a54e14a3e1bfe
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2008
Tested-by: jenkins
Reviewed-by: Henry Robinson <henry@cloudera.com>