Speedscope{Frame,Event}: convert to dataclasses
Speedscope{Frame,Event}: convert to dataclasses

This commit changes the SpeedscopeFrame and SpeedscopeEvent types from
class-style namedtuples to dataclasses because I couldn't figure out
how to serialize namedtuples to JSON objects via:

* subclassing json.JSONEncoder

* defining a default method

Attempting to return a dictionary using the data in each namedtuple
did not seem to yield a string containing a JSON object; instead, a
string containing a JSON array was returned.

Changing the namedtuple types to dataclasses and leveraging the
__dict__ dunder field, in concert with subclassing json.JSONEncoder
and defining a default method, yielded the desired result, although
memory usage will increase slightly.

joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument