Containment in leader-follower networks with switching communication topologies