GrpAvoid: Multigroup Collision-Avoidance Control and Optimization for UAV Swarm