Remove duplicates on a per-source basis.

This attempts to fix the issue of two candidates being considered duplicates even if they come from different sources. DELETE-DUPS is now called before the result of AC-CANDIDATES-1 is appended into the list of candidates.

This should be faster than the solution proposed in #247 (and in most cases faster than the original implementation) and should solve #337. This could (should?) possibly be combined with #340 as well.