[TimeStream classes] implement writing, json

- Add tests for writing image, and jsons
- Add json serialisaion of TS.data and TSImage.data
- Misc tests & fixes