codeintel: Add CommitsVisibleToUpload to dbstore
Created by: efritz
Add a method to the dbstore that returns the set of commits for which an upload can answer code intelligence queries. This requires two inverted indexes so we can query the relationships in the reverse direction of what we are currently using it for in the current query path.
Index generation took about ~3 seconds on a copy of the current Cloud dataset, and our largest enterprise customer currently has this feature disabled, so these should be fine to create in-band during an upgrade.