Use BuildRuleResolver.computeIfAbsent for DCompileBuildRule
Use BuildRuleResolver.computeIfAbsent for DCompileBuildRule

Summary: Convert getRuleOptional + addToIndex to use the newly introduced BuildRuleResolver.computeIfAbsent.

Test Plan: CI

Reviewed By: dinhviethoa

fbshipit-source-id: d3659b5

kageiit/buck,SeleniumHQ/buck,robbertvanginkel/buck,brettwooldridge/buck,zhan-xiong/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,marcinkwiatkowski/buck,brettwooldridge/buck,zpao/buck,shs96c/buck,JoelMarcey/buck,clonetwin26/buck,brettwooldridge/buck,ilya-klyuchnikov/buck,shs96c/buck,clonetwin26/buck,LegNeato/buck,robbertvanginkel/buck,ilya-klyuchnikov/buck,LegNeato/buck,zhan-xiong/buck,Addepar/buck,LegNeato/buck,facebook/buck,romanoid/buck,dsyang/buck,shybovycha/buck,dsyang/buck,clonetwin26/buck,zhan-xiong/buck,k21/buck,Addepar/buck,brettwooldridge/buck,zhan-xiong/buck,k21/buck,romanoid/buck,Addepar/buck,marcinkwiatkowski/buck,k21/buck,rmaz/buck,shybovycha/buck,robbertvanginkel/buck,nguyentruongtho/buck,nguyentruongtho/buck,romanoid/buck,kageiit/buck,brettwooldridge/buck,robbertvanginkel/buck,romanoid/buck,rmaz/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,zhan-xiong/buck,shs96c/buck,Addepar/buck,marcinkwiatkowski/buck,shs96c/buck,dsyang/buck,SeleniumHQ/buck,zhan-xiong/buck,SeleniumHQ/buck,LegNeato/buck,clonetwin26/buck,zhan-xiong/buck,rmaz/buck,zpao/buck,nguyentruongtho/buck,romanoid/buck,rmaz/buck,zhan-xiong/buck,kageiit/buck,shs96c/buck,Addepar/buck,SeleniumHQ/buck,rmaz/buck,nguyentruongtho/buck,romanoid/buck,rmaz/buck,JoelMarcey/buck,facebook/buck,facebook/buck,brettwooldridge/buck,JoelMarcey/buck,k21/buck,LegNeato/buck,LegNeato/buck,shs96c/buck,marcinkwiatkowski/buck,LegNeato/buck,clonetwin26/buck,rmaz/buck,robbertvanginkel/buck,zhan-xiong/buck,clonetwin26/buck,romanoid/buck,clonetwin26/buck,JoelMarcey/buck,Addepar/buck,dsyang/buck,robbertvanginkel/buck,shybovycha/buck,dsyang/buck,robbertvanginkel/buck,shs96c/buck,SeleniumHQ/buck,Addepar/buck,robbertvanginkel/buck,romanoid/buck,rmaz/buck,shybovycha/buck,zhan-xiong/buck,brettwooldridge/buck,LegNeato/buck,JoelMarcey/buck,LegNeato/buck,romanoid/buck,k21/buck,marcinkwiatkowski/buck,dsyang/buck,k21/buck,facebook/buck,kageiit/buck,JoelMarcey/buck,clonetwin26/buck,shybovycha/buck,ilya-klyuchnikov/buck,zhan-xiong/buck,clonetwin26/buck,brettwooldridge/buck,clonetwin26/buck,Addepar/buck,shybovycha/buck,zhan-xiong/buck,zpao/buck,rmaz/buck,romanoid/buck,brettwooldridge/buck,marcinkwiatkowski/buck,clonetwin26/buck,marcinkwiatkowski/buck,SeleniumHQ/buck,shs96c/buck,robbertvanginkel/buck,marcinkwiatkowski/buck,shs96c/buck,k21/buck,romanoid/buck,dsyang/buck,facebook/buck,ilya-klyuchnikov/buck,k21/buck,k21/buck,shybovycha/buck,dsyang/buck,rmaz/buck,dsyang/buck,SeleniumHQ/buck,Addepar/buck,brettwooldridge/buck,JoelMarcey/buck,brettwooldridge/buck,marcinkwiatkowski/buck,Addepar/buck,marcinkwiatkowski/buck,brettwooldridge/buck,rmaz/buck,Addepar/buck,JoelMarcey/buck,clonetwin26/buck,shs96c/buck,shybovycha/buck,dsyang/buck,shs96c/buck,kageiit/buck,nguyentruongtho/buck,ilya-klyuchnikov/buck,shs96c/buck,nguyentruongtho/buck,dsyang/buck,SeleniumHQ/buck,LegNeato/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,shybovycha/buck,rmaz/buck,dsyang/buck,ilya-klyuchnikov/buck,JoelMarcey/buck,LegNeato/buck,JoelMarcey/buck,shybovycha/buck,JoelMarcey/buck,marcinkwiatkowski/buck,clonetwin26/buck,LegNeato/buck,shybovycha/buck,ilya-klyuchnikov/buck,facebook/buck,zhan-xiong/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,robbertvanginkel/buck,brettwooldridge/buck,romanoid/buck,k21/buck,Addepar/buck,rmaz/buck,romanoid/buck,LegNeato/buck,ilya-klyuchnikov/buck,zpao/buck,zpao/buck,k21/buck,shybovycha/buck,SeleniumHQ/buck,robbertvanginkel/buck,facebook/buck,nguyentruongtho/buck,k21/buck,zpao/buck,dsyang/buck,kageiit/buck,Addepar/buck,ilya-klyuchnikov/buck,kageiit/buck,zpao/buck,k21/buck,shs96c/buck,SeleniumHQ/buck,ilya-klyuchnikov/buck,marcinkwiatkowski/buck,robbertvanginkel/buck,JoelMarcey/buck,SeleniumHQ/buck,shybovycha/buck