[Profiler] Fix segfault in AppendOnlyList
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77997
`buffer_last_` is supposed to start at buffer_.before_begin(). It is correctly set in the ctor, but incorrectly set in `clear()`. This causes a segfault in `maybe_grow()` (Specifically, `buffer_.emplace_after(buffer_last_)`) for an AppendOnlyList which has been cleared.
Differential Revision: [D36555737](https://our.internmc.facebook.com/intern/diff/D36555737/)
Approved by: https://github.com/aaronenyeshi