[MemProf] Add interface for reseting the profile file descriptor (#73714)

Add __memprof_profile_reset() interface which can be used to facilitate
dumping multiple rounds of profiles from a single binary run. This
closes the current file descriptor and resets the internal file
descriptor to invalid (-1), which ensures the underlying writer reopens
the recorded profile filename. This can be used once the client is done
moving or copying a dumped profile, to prepare for reinvoking profile
dumping.

GitOrigin-RevId: ae86239e86e9e289167fad2d7465d254852ecb82
4 files changed