[CFI] Refactor `CfiFunctionIndex` to externalize GUID calculation (#201635)
In preparation for PR #201370 - the goal is to decouple CFI from _how_
ThinLTO computes its GUIDs, and enable PR #184065 (for this
[RFC](https://discourse.llvm.org/t/rfc-keep-globalvalue-guids-stable/84801)).
This PR just changes APIs and the internal implementation of
CfiFunctionIndex, the subsequent one (201370) actually propagates GUIDs
through metadata. It's _almost_ NFC - the YAML format does change
though.