Constraint Inference in Control Tasks from Expert Demonstrations via Inverse Optimization