TaCOS: Task-Specific Camera Optimization with Simulation