[HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
[Debug] fix checkip6
bug #13114 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head... (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP head...

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

On symfony.com, we have errors related to IP addresses in the `X-Forwarded-For` HTTP header that have a port. If that happens (I have no ideas what is doing that), the page crashes with an error like `inet_pton(): Unrecognized address 187.65.229.211:63479` (which comes from IpUtils::checkIpv6()). This fixes the root cause by removing the port.

#12572 is solving the consequence and I propose to also merge it.

Commits
-------

60ad382 [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
No global state for isolated tests and other fixes
minor #13144 No global state for isolated tests and other fixes (nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

No global state for isolated tests and other fixes

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

By default, phpunit preserves global state for isolated processes. This made the tests break on my laptop.
Other tweaks included.
In branch 2.5, `src/Symfony/Component/Security/Csrf/Tests/TokenStorage/NativeSessionTokenStorageTest.php` also misses the `@preserveGlobalState disabled` annotation. Please add it when merging

Commits
-------

750f3a6 No global state for isolated tests and other fixes
Merge branch '2.3' into 2.5

* 2.3:
  No global state for isolated tests and other fixes
  [TwigBundle] Moved the setting of the default escaping strategy from the Twig engine to the Twig environment
  [Debug] fix checkip6
  [HttpFoundation] fixed error when an IP in the X-Forwarded-For HTTP header contains a port
  Update the note about origins of the CssSelector component.
  Use the correct cssselect library name in docblocks.