Remove need_dup/avoided_dup counters

Remove the need_dup/avoided_dup counters as they were unreliable in
the presence of code from external packages and tended to be scattered
all around the code. With this commit diffstat now reports 42 changed
files compared to 53 without it.