Write a saner feature comparison function

Signed-off-by: Harsh Gupta <gupta.harsh96@gmail.com>
Factor out sortAnnotationsByLocation from EditTrack

Signed-off-by: Harsh Gupta <gupta.harsh96@gmail.com>