A simple hint. Although we cannot remove the duplicate messages stored in the All Mail folder of a Gmail IMAP account in Mail.app -- we can't even unsubscribe from the folder -- at least we can add the folder to Spotlight's list of places not to index. Then searching will no longer show duplicate emails.
In System Preferences » Spotlight » Privacy, add each user's All Mail Gmail folder, usually found here:
~/Library » Mail » IMAP-username@imap.gmail.com » [Gmail] » All Mail.imapmbox
Not perfect, but no longer finding duplicates is nice.
Mac OS X Hints
http://hints.macworld.com/article.php?story=200802081934189