[memprof] Use std::optional (NFC) (#89317)

This is partly for readability and partly for consistency with other
id-to-frame callbacks.

GitOrigin-RevId: 446371f5ccbd81aa7707b4f1a1baa0ea0955dc67
1 file changed