After initially defending its sale of a controversial e-book, Amazon has removed a self-published guide for pedophiles.