[Console] Make sure formatter is the same

The parent constructor will create a new formatter if the $formatter parameter is null
This fix avoids that the formatter becomes 2 different instances in $this and $this->stderr
bug #11272 [Console] Make sure formatter is the same. (akimsko)

This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #11272).

Discussion
----------

[Console] Make sure formatter is the same.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
The parent constructor will create a new formatter if the $formatter parameter is null.

This fix avoids that the formatter becomes 2 different instances in $this and $this->stderr, if null was passed to the constructor.

Commits
-------

64328d9 [Console] Make sure formatter is the same