Iterative Active-Inactive Obstacle Classification for Time-Optimal Collision Avoidance