Spontaneous Emergence of Multitasking Robotic Swarms