Add unit tests for "Threads" class
Add unit tests for "Threads" class

Summary: Closes https://github.com/facebook/buck/pull/532

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewed By: svcscm

Pulled By: sdwilsh

fb-gh-sync-id: a814b48

dsyang/buck,Addepar/buck,daedric/buck,shs96c/buck,Dominator008/buck,zpao/buck,Addepar/buck,vine/buck,romanoid/buck,mikekap/buck,OkBuilds/buck,shs96c/buck,illicitonion/buck,rowillia/buck,SeleniumHQ/buck,clonetwin26/buck,kageiit/buck,clonetwin26/buck,illicitonion/buck,clonetwin26/buck,mogers/buck,zpao/buck,vschs007/buck,rmaz/buck,JoelMarcey/buck,ilya-klyuchnikov/buck,SeleniumHQ/buck,romanoid/buck,k21/buck,darkforestzero/buck,robbertvanginkel/buck,sdwilsh/buck,daedric/buck,k21/buck,vine/buck,robbertvanginkel/buck,bocon13/buck,illicitonion/buck,rmaz/buck,vine/buck,SeleniumHQ/buck,zpao/buck,brettwooldridge/buck,raviagarwal7/buck,bocon13/buck,LegNeato/buck,OkBuilds/buck,grumpyjames/buck,shybovycha/buck,grumpyjames/buck,grumpyjames/buck,romanoid/buck,brettwooldridge/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,mogers/buck,OkBuilds/buck,clonetwin26/buck,brettwooldridge/buck,LegNeato/buck,janicduplessis/buck,shs96c/buck,Dominator008/buck,rmaz/buck,rowillia/buck,illicitonion/buck,shs96c/buck,JoelMarcey/buck,bocon13/buck,daedric/buck,brettwooldridge/buck,ilya-klyuchnikov/buck,liuyang-li/buck,clonetwin26/buck,Addepar/buck,SeleniumHQ/buck,rmaz/buck,grumpyjames/buck,shybovycha/buck,illicitonion/buck,clonetwin26/buck,kageiit/buck,davido/buck,LegNeato/buck,darkforestzero/buck,davido/buck,bocon13/buck,justinmuller/buck,clonetwin26/buck,bocon13/buck,robbertvanginkel/buck,romanoid/buck,justinmuller/buck,SeleniumHQ/buck,shs96c/buck,romanoid/buck,mogers/buck,daedric/buck,vine/buck,Distrotech/buck,justinmuller/buck,clonetwin26/buck,OkBuilds/buck,zhan-xiong/buck,justinmuller/buck,illicitonion/buck,romanoid/buck,grumpyjames/buck,robbertvanginkel/buck,clonetwin26/buck,dsyang/buck,raviagarwal7/buck,dsyang/buck,janicduplessis/buck,mogers/buck,romanoid/buck,dsyang/buck,shs96c/buck,darkforestzero/buck,k21/buck,SeleniumHQ/buck,davido/buck,daedric/buck,SeleniumHQ/buck,robbertvanginkel/buck,brettwooldridge/buck,kageiit/buck,LegNeato/buck,JoelMarcey/buck,grumpyjames/buck,bocon13/buck,daedric/buck,OkBuilds/buck,ilya-klyuchnikov/buck,brettwooldridge/buck,k21/buck,zhan-xiong/buck,facebook/buck,mikekap/buck,marcinkwiatkowski/buck,dsyang/buck,darkforestzero/buck,rmaz/buck,ilya-klyuchnikov/buck,Dominator008/buck,LegNeato/buck,vschs007/buck,sdwilsh/buck,Distrotech/buck,liuyang-li/buck,Addepar/buck,darkforestzero/buck,mikekap/buck,marcinkwiatkowski/buck,janicduplessis/buck,OkBuilds/buck,rowillia/buck,liuyang-li/buck,JoelMarcey/buck,darkforestzero/buck,shybovycha/buck,vine/buck,mikekap/buck,shybovycha/buck,zpao/buck,sdwilsh/buck,mogers/buck,raviagarwal7/buck,rowillia/buck,Addepar/buck,rmaz/buck,justinmuller/buck,nguyentruongtho/buck,grumpyjames/buck,janicduplessis/buck,mikekap/buck,davido/buck,ilya-klyuchnikov/buck,robbertvanginkel/buck,davido/buck,marcinkwiatkowski/buck,grumpyjames/buck,janicduplessis/buck,daedric/buck,mogers/buck,mikekap/buck,k21/buck,brettwooldridge/buck,daedric/buck,illicitonion/buck,janicduplessis/buck,daedric/buck,marcinkwiatkowski/buck,zhan-xiong/buck,justinmuller/buck,vschs007/buck,rowillia/buck,Dominator008/buck,sdwilsh/buck,liuyang-li/buck,raviagarwal7/buck,romanoid/buck,Addepar/buck,zhan-xiong/buck,brettwooldridge/buck,JoelMarcey/buck,Dominator008/buck,vschs007/buck,rmaz/buck,LegNeato/buck,brettwooldridge/buck,sdwilsh/buck,rowillia/buck,robbertvanginkel/buck,mikekap/buck,marcinkwiatkowski/buck,justinmuller/buck,liuyang-li/buck,romanoid/buck,OkBuilds/buck,dsyang/buck,justinmuller/buck,k21/buck,rowillia/buck,LegNeato/buck,vschs007/buck,k21/buck,rmaz/buck,facebook/buck,facebook/buck,grumpyjames/buck,shs96c/buck,justinmuller/buck,brettwooldridge/buck,rmaz/buck,ilya-klyuchnikov/buck,SeleniumHQ/buck,shs96c/buck,LegNeato/buck,LegNeato/buck,liuyang-li/buck,liuyang-li/buck,raviagarwal7/buck,vschs007/buck,zhan-xiong/buck,janicduplessis/buck,rmaz/buck,shs96c/buck,facebook/buck,OkBuilds/buck,shybovycha/buck,sdwilsh/buck,Dominator008/buck,OkBuilds/buck,Addepar/buck,darkforestzero/buck,romanoid/buck,nguyentruongtho/buck,sdwilsh/buck,JoelMarcey/buck,zpao/buck,vine/buck,davido/buck,shs96c/buck,raviagarwal7/buck,darkforestzero/buck,k21/buck,raviagarwal7/buck,marcinkwiatkowski/buck,bocon13/buck,LegNeato/buck,kageiit/buck,marcinkwiatkowski/buck,zhan-xiong/buck,sdwilsh/buck,janicduplessis/buck,ilya-klyuchnikov/buck,illicitonion/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,Distrotech/buck,dsyang/buck,facebook/buck,SeleniumHQ/buck,k21/buck,illicitonion/buck,illicitonion/buck,zhan-xiong/buck,k21/buck,rowillia/buck,vine/buck,OkBuilds/buck,zhan-xiong/buck,marcinkwiatkowski/buck,vschs007/buck,shs96c/buck,grumpyjames/buck,mogers/buck,raviagarwal7/buck,shybovycha/buck,mogers/buck,rowillia/buck,ilya-klyuchnikov/buck,romanoid/buck,zpao/buck,dsyang/buck,shybovycha/buck,SeleniumHQ/buck,daedric/buck,davido/buck,dsyang/buck,Distrotech/buck,brettwooldridge/buck,davido/buck,kageiit/buck,liuyang-li/buck,illicitonion/buck,Addepar/buck,Dominator008/buck,kageiit/buck,darkforestzero/buck,vine/buck,janicduplessis/buck,Addepar/buck,grumpyjames/buck,clonetwin26/buck,JoelMarcey/buck,romanoid/buck,raviagarwal7/buck,davido/buck,rmaz/buck,liuyang-li/buck,shs96c/buck,bocon13/buck,sdwilsh/buck,justinmuller/buck,davido/buck,JoelMarcey/buck,JoelMarcey/buck,mikekap/buck,shybovycha/buck,nguyentruongtho/buck,Addepar/buck,brettwooldridge/buck,ilya-klyuchnikov/buck,vschs007/buck,darkforestzero/buck,raviagarwal7/buck,zpao/buck,Dominator008/buck,janicduplessis/buck,shybovycha/buck,mogers/buck,justinmuller/buck,Distrotech/buck,vschs007/buck,Addepar/buck,Distrotech/buck,LegNeato/buck,bocon13/buck,shybovycha/buck,robbertvanginkel/buck,darkforestzero/buck,mikekap/buck,mikekap/buck,dsyang/buck,SeleniumHQ/buck,Dominator008/buck,rowillia/buck,sdwilsh/buck,darkforestzero/buck,zhan-xiong/buck,ilya-klyuchnikov/buck,Dominator008/buck,daedric/buck,facebook/buck,vschs007/buck,nguyentruongtho/buck,raviagarwal7/buck,rmaz/buck,Distrotech/buck,mikekap/buck,mogers/buck,robbertvanginkel/buck,ilya-klyuchnikov/buck,k21/buck,nguyentruongtho/buck,brettwooldridge/buck,grumpyjames/buck,justinmuller/buck,clonetwin26/buck,shybovycha/buck,marcinkwiatkowski/buck,OkBuilds/buck,Addepar/buck,OkBuilds/buck,davido/buck,davido/buck,vschs007/buck,nguyentruongtho/buck,illicitonion/buck,shs96c/buck,vine/buck,vschs007/buck,zhan-xiong/buck,Addepar/buck,daedric/buck,darkforestzero/buck,janicduplessis/buck,k21/buck,JoelMarcey/buck,Distrotech/buck,janicduplessis/buck,Dominator008/buck,rowillia/buck,shybovycha/buck,dsyang/buck,romanoid/buck,sdwilsh/buck,nguyentruongtho/buck,kageiit/buck,Distrotech/buck,JoelMarcey/buck,zhan-xiong/buck,bocon13/buck,rmaz/buck,vine/buck,bocon13/buck,Distrotech/buck,raviagarwal7/buck,vine/buck,marcinkwiatkowski/buck,shybovycha/buck,dsyang/buck,JoelMarcey/buck,SeleniumHQ/buck,facebook/buck,justinmuller/buck,clonetwin26/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,LegNeato/buck,zhan-xiong/buck,LegNeato/buck,dsyang/buck,vschs007/buck,daedric/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,JoelMarcey/buck,sdwilsh/buck,liuyang-li/buck,davido/buck,mogers/buck,Dominator008/buck,robbertvanginkel/buck,sdwilsh/buck,clonetwin26/buck,k21/buck,bocon13/buck,zhan-xiong/buck,rowillia/buck,OkBuilds/buck,SeleniumHQ/buck,liuyang-li/buck,illicitonion/buck,Distrotech/buck,mikekap/buck,raviagarwal7/buck