[memprof] Introduce IndexedMemProfReader (NFC) (#89331)

Without this patch, a lot of details about the deserilization of the
MemProf data are exposed in IndexedInstrProfReader -- four
MemProf-related variables in IndexedInstrProfReader plus 90+ lines of
deserilization code within IndexedInstrProfReader::readHeader.

This patch encapsulates them into a separate class, exposing only
three methods, namely the default constructor, deserialize, and
getMemProfRecord.

GitOrigin-RevId: b64c69d5b1bfeaf675f25e7598b78e9f3543f241
2 files changed