General copy paste rewriter

Replace the duplicate-URL detector with
a general copy-paste rewriter.

The copy-paste rewriter detects situations
where people use ctrl-v multiple times to
pad out a message and rewrites the message
so that the copy pasted stuff appears only once.
Merge pull request #51 from hugomg/copypaste

General copy paste rewriter