[GlobalDCE][NFC] scan each vtable slot only once per function (#240541)
Extracted from https://github.com/llvm/llvm-project/pull/232495.
A small optimization to how often `ScanVTableLoad` runs: it now runs
only once per function. Especially after inlining, rust will regularly
load the same function pointer from a vtable multiple times in the same
function. Only the first load is relevant for liveness.