Issue title: Long running metrics issue
 Issue body: The following metrics take too long and cause issues as the CAS and ActionResult sizes grow. These need to be retrieved in a constant time.

casLookupSize
actionCacheLookupSize
blockedActionsSize
blockedInvocationsSize
 Comments: 
 Comment 0: We have a solution to this, but its a bigger change, and we've decided to skip these metrics.
{'source': 'GithubIssues', 'repo_name_with_owner': 'bazelbuild/bazel-buildfarm', 'issue_id': 866398437, 'repo_stars': 506.0}