Optimal Virtual Tube Planning and Control for Swarm Robotics