I concur that Amazon should vet self-published books, even though it will slow down the self-publishing process and could incur a cost for self-publishers.
As to the "how," that's what database programmers are for.
Amazon already has a fairly comprehensive list of books in and out of print, so it should be possible (though I'm sure far from easy) to use that as the basis for a verification system. It doesn't need to be perfect, it just has to do better than whatever they're doing now.
For what it's worth, Sony is also working on their own self-publishing ebook service. I for one fully expect the Greek Chorus of Mobileread to blame Sony when the Harry Potter pirated books are listed for sale through the Sony Store.