(TK-47) Modify endpoint data structure

Modify the list of endpoints to be a map. Now, since an
endpoint can have multiple handlers registered on it,
each key in the map is an endpoint, with its value being a
vector of all the handlers registered at that endpoint.