New data structure

We are going to use it when we re-implement the `flipDirection` method on a `Connection`. I think you are right though, I will make it accept a reference to an `Endpoint`, rather than its id.