CheckForDuplicateTracks:

--------------------------------------------------------------------------
   Check for duplicate tracks. 

   Compares treeID, measHist, scanHist, sensorHist.

   Cycles through all tracks. Compares j'th track with k'th track (k>j).
   If the two tracks have identical (treeID, measHist, scanHist, sensorHist), 
   they are marked as a duplicate pair.

   If the two tracks have identical (measHist, scanHist, sensorHist) and 
   input "allTrees" is true, they are marked as a duplicate pair.

--------------------------------------------------------------------------
   Form:
   dup = CheckForDuplicateTracks( trk, allTrees )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   trk       (:)     Track data structure array. Must include fields:
                       .treeID       Integer track-tree ID
                       .measHist     Integer array of measurement numbers
                       .scanHist     Integer array of scan numbers
                       .sensorHist   Integer array of sensor IDs

   allTrees  (1,1)   If 1, then look for duplicates across all trees. 
                     If 0, then look for duplicates within each tree.
                     Default is 0.

   -------
   Outputs
   -------
   dup       (N,2)   Matrix of duplicate tracks. N rows of index pairs. 
                     For example, dup = [3 5;4 7] means that trk(3) and 
                     trk(5) are duplicates, and that trk(4) and trk(7) are
                     duplicates.

--------------------------------------------------------------------------