Astronomers find Sun-like star that devoured its own planets