[Validator] Fixed object initializers in 2.5 version of the Validator
bug #11410 [Validator] Fixed object initializers in 2.5 version of the Validator (webmozart)

This PR was merged into the 2.5 branch.

Discussion
----------

[Validator] Fixed object initializers in 2.5 version of the Validator

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #11159
| License       | MIT
| Doc PR        | -

Object initializers were forgot in the 2.5 Validator API. This PR implements them.

A bug was fixed also in the old version which resulted in the initializers being called multiple times if an object was validated in multiple groups within the same validation run. This fix will be backported separately to older versions.

Commits
-------

ce04073 [Validator] Fixed object initializers in 2.5 version of the Validator