Add ProgramUsage side-car to track variable and function references

Automatically computed once IR generation is complete, and then used
throughout optimization and inlining, and the backend generators.
Optimization and inlining are reworked to keep the data up-to-date as
they edit the IR.

Bug: skia:10589
Change-Id: Iaded42d8157732dd6fe05f74c5b7bb8366916635
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328382
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
13 files changed