[WIP] Add to_dict method to topology

This code is currently in `HDF5TrajectoryFile`, and should be factored out

- [ ] remove implementation from `HDF5TrajectoryFile`.
- [x] add method to topology