#327 Rework match merging and filtering
#327 Rework match merging and filtering

 * merge_matches is a now a function and merging only works for matches 
   to the same rule and considers equality, overlap, containment,
   distance and sequence to merge or not.
 * filter_contained_matches considers equality and score, containment, 
   overalap and overlap ratios (small, medium, large and extra large)
   with match length, licensing containment and surrounding to filter
   out matches or not. Comparisons are assymetric and done both ways 
   when needed.
 * filter_spurious_matches threshold have been refined and tuned
 
Signed-off-by: Philippe Ombredanne <ca95c4a6a4931f366cbdaf5878c5016609417d37@nexb.com>
michaelrup/scancode-toolkit,yashdsaraf/scancode-toolkit,marcreyesph/scancode-toolkit,yashdsaraf/scancode-toolkit,yasharmaster/scancode-toolkit,marcreyesph/scancode-toolkit,yasharmaster/scancode-toolkit,marcreyesph/scancode-toolkit,michaelrup/scancode-toolkit,yashdsaraf/scancode-toolkit,marcreyesph/scancode-toolkit,yashdsaraf/scancode-toolkit,yashdsaraf/scancode-toolkit,yasharmaster/scancode-toolkit,yashdsaraf/scancode-toolkit,yashdsaraf/scancode-toolkit,yasharmaster/scancode-toolkit,yasharmaster/scancode-toolkit,yasharmaster/scancode-toolkit,michaelrup/scancode-toolkit,michaelrup/scancode-toolkit,michaelrup/scancode-toolkit,yasharmaster/scancode-toolkit,yashdsaraf/scancode-toolkit,michaelrup/scancode-toolkit,michaelrup/scancode-toolkit,michaelrup/scancode-toolkit,yashdsaraf/scancode-toolkit,yashdsaraf/scancode-toolkit,yashdsaraf/scancode-toolkit,marcreyesph/scancode-toolkit,yasharmaster/scancode-toolkit,marcreyesph/scancode-toolkit,yasharmaster/scancode-toolkit,yasharmaster/scancode-toolkit,yasharmaster/scancode-toolkit,marcreyesph/scancode-toolkit,marcreyesph/scancode-toolkit,michaelrup/scancode-toolkit,marcreyesph/scancode-toolkit,michaelrup/scancode-toolkit,marcreyesph/scancode-toolkit,marcreyesph/scancode-toolkit,michaelrup/scancode-toolkit,michaelrup/scancode-toolkit,yasharmaster/scancode-toolkit,yashdsaraf/scancode-toolkit,marcreyesph/scancode-toolkit