This is being done in preparation for writing a format from rbspy to import into speedscope, whose internal file format is a list of stacks (https://github.com/rbspy/rbspy/blob/111689fe13f843ac6786855ac10ce66c3ad84ab7/src/storage/v1.rs#L13) For now, speedscope will always export the evented format rather than the sampled format, but will accept either as input. I also added tests for existing versions of the file format to ensure I don't accidentally drop support for a past version of the file format.