search: merge line matches for union operation
Created by: rvantonder
This PR merges line matches in the same file for union operations. If this isn't done, the results may contain distinct line match results for the same file, which means we show the file multiple times in the webapp for the separate results, rather than highlight the union of results in the same file.
Behavior covered by integration test.