[routegraph] Move TrackElement constructor implementation into .cpp file
[routegraph] Fix memory leak by deleting next/prev vectors of TrackElements