Fixed bug with entity waypoint connections.

Waypoints are now saved in order of connection to entity.
Deletion of waypoints now delete waypoints from connections.