Dead planets can ‘broadcast’ for up to a billion years, and they could tell astronomers what will happen after our sun blows up