[Coverage] Speed up file-based queries for coverage info, NFC
Speed up queries for coverage info in a file by reducing the amount of
time spent determining whether a function record corresponds to a file.
This gives a 36% speedup when generating a coverage report for llc.
The reduction is entirely in user time.
Differential Revision: https://reviews.llvm.org/D67575