Merge duplicate outputs

If duplicate outputs appear (e.g. multiply parties spending to the
same address), merge these outputs into one to prevent two outputs
having the same key. This also disguises the fact that two people
were spending to the same place, for further obfuscation.