Added resizing of constraint optimizer's solve input

Before the user was expected to resize the output vector before calling solve, now the constraint optimizer does it automatically. I also added a new error type for an empty objective, which is needed.