add slack name to CompositeConstraint

1. Add 'cost' and 'slack_name' to CompositeConstraint.
2. Add a test case for CompositeConstraint in testNLPWConstraint
3. Add 'x_name' field to NonlinearProgramWConstraintObjects
I didn't mean that you would have to use `addSlackVariables` instead of the constructor, only that the code in the constructor looked nearly identical to that in `addSlackVariables` and so maybe there was an opportunity for code reuse.