Replace getRuleOptional*...addToIndex with computeIfAbsent in RustCompileUtils
Replace getRuleOptional*...addToIndex with computeIfAbsent in RustCompileUtils

Summary:
getRuleOptional ... addToIndex suffers from race conditions when constructing
action graph in parallel.  Use computeIfAbsent where it makes sense to do so.

Test Plan: CI

Reviewed By: ttsugriy

fbshipit-source-id: 3bcb2d1

nguyentruongtho/buck,LegNeato/buck,SeleniumHQ/buck,facebook/buck,ilya-klyuchnikov/buck,rmaz/buck,shybovycha/buck,brettwooldridge/buck,shybovycha/buck,LegNeato/buck,facebook/buck,shs96c/buck,zpao/buck,facebook/buck,ilya-klyuchnikov/buck,zpao/buck,facebook/buck,rmaz/buck,Addepar/buck,shybovycha/buck,ilya-klyuchnikov/buck,Addepar/buck,SeleniumHQ/buck,JoelMarcey/buck,rmaz/buck,shs96c/buck,LegNeato/buck,zpao/buck,LegNeato/buck,Addepar/buck,ilya-klyuchnikov/buck,clonetwin26/buck,rmaz/buck,shs96c/buck,LegNeato/buck,LegNeato/buck,shybovycha/buck,SeleniumHQ/buck,Addepar/buck,shs96c/buck,LegNeato/buck,facebook/buck,SeleniumHQ/buck,SeleniumHQ/buck,romanoid/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,SeleniumHQ/buck,shs96c/buck,facebook/buck,brettwooldridge/buck,SeleniumHQ/buck,rmaz/buck,clonetwin26/buck,JoelMarcey/buck,clonetwin26/buck,shybovycha/buck,shybovycha/buck,Addepar/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,romanoid/buck,SeleniumHQ/buck,nguyentruongtho/buck,SeleniumHQ/buck,romanoid/buck,shs96c/buck,nguyentruongtho/buck,JoelMarcey/buck,LegNeato/buck,Addepar/buck,kageiit/buck,shybovycha/buck,rmaz/buck,nguyentruongtho/buck,brettwooldridge/buck,clonetwin26/buck,kageiit/buck,clonetwin26/buck,Addepar/buck,Addepar/buck,nguyentruongtho/buck,JoelMarcey/buck,rmaz/buck,JoelMarcey/buck,JoelMarcey/buck,kageiit/buck,Addepar/buck,romanoid/buck,rmaz/buck,brettwooldridge/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,shybovycha/buck,ilya-klyuchnikov/buck,LegNeato/buck,LegNeato/buck,LegNeato/buck,romanoid/buck,SeleniumHQ/buck,SeleniumHQ/buck,clonetwin26/buck,rmaz/buck,kageiit/buck,brettwooldridge/buck,JoelMarcey/buck,clonetwin26/buck,ilya-klyuchnikov/buck,ilya-klyuchnikov/buck,kageiit/buck,kageiit/buck,brettwooldridge/buck,shs96c/buck,brettwooldridge/buck,romanoid/buck,Addepar/buck,LegNeato/buck,ilya-klyuchnikov/buck,shybovycha/buck,clonetwin26/buck,SeleniumHQ/buck,shybovycha/buck,clonetwin26/buck,zpao/buck,nguyentruongtho/buck,shs96c/buck,brettwooldridge/buck,romanoid/buck,JoelMarcey/buck,clonetwin26/buck,shs96c/buck,rmaz/buck,shs96c/buck,brettwooldridge/buck,romanoid/buck,JoelMarcey/buck,Addepar/buck,facebook/buck,kageiit/buck,brettwooldridge/buck,brettwooldridge/buck,shybovycha/buck,shs96c/buck,zpao/buck,ilya-klyuchnikov/buck,nguyentruongtho/buck,zpao/buck,romanoid/buck,Addepar/buck,Addepar/buck,clonetwin26/buck,clonetwin26/buck,rmaz/buck,rmaz/buck,brettwooldridge/buck,shybovycha/buck,rmaz/buck,shs96c/buck,shs96c/buck,shybovycha/buck,romanoid/buck,LegNeato/buck,clonetwin26/buck,romanoid/buck,JoelMarcey/buck,romanoid/buck,zpao/buck,romanoid/buck,brettwooldridge/buck,JoelMarcey/buck