Optimal Integrated Task and Path Planning and Its Application to Multi-Robot Pickup and Delivery