[Form] Add getErrorsAsArray method

Usefull to return form errors through JsonResponse. 

See https://github.com/symfony/symfony/issues/7205

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | 7205
| License       | MIT
| Doc PR        | Is it needed for this kind of addition?

	modified:   src/Symfony/Component/Form/Form.php
	modified:   src/Symfony/Component/Form/Tests/CompoundFormTest.php
	modified:   src/Symfony/Component/Form/Tests/SimpleFormTest.php