[Validator] Added ConstraintViolation::getConstraint()

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

This PR adds a `getConstraint()` method to the `ConstraintViolation` in order to access the constraint causing the violation.

Related to #7276, #7273 and #9691.
There is indeed no guarantee, but the implementation should ensure that `setConstraint()` is called (just as `initialized()` needs to be called before `validate()` on constraint validators).