How Self-Replicating Spacecraft Could Take Over the Galaxy