rest: Serialize fields according to protocol and add unit tests
This patch makes sure all model objects are serialized according to the trace server protocol's official API.
It also adds unit tests for both xy and time graph data provider and make sure objects can be deserialized in accordance to the protocol's specification. The tests use stubs instead of comparing json strings, as they can apply to many tests and mistakes can be made with json strings, but deserializers make sure the produced json can deserialize to the expected types.
[Changed] The trace server's data provider serializes according to the latest TSP