[NFC] In D152399, we calculate BPI->BFI in MachineFunctionSplit pass just to use PSI->isFunctionHotInCallGraph, which is expensive. Instead, we can implement this directly with MBFI.
Reviewer @wenlei mentioned in his commet, that machine_size_opts already has isFunctionColdInCallGraph, isFunctionHotInCallGraphNthPercentile, etc implemented. These can be refactored and reused across MFS and machine size opts.
This CL does this - it refactors out those internal static functions into PSI as templated functions, so they can be accessed easily.
nit: FunctionType->FuncT to be consistent with BFIT and other template definitions.