[Process] Properly close pipes after a Process::stop call
merged branch romainneutron/timeout-restart (PR #9050)

This PR was merged into the 2.3 branch.

Discussion
----------

[Process][2.3] Properly close pipes after a Process::stop call

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

When calling `Process::stop`, if the process does not stop before the end of the method, pipes are not close, `proc_close` is not called.
I added a test that randomly fails without the patch :

```
phpunit --filter=testStartAfterATimeout --repeat 100 Tests/SimpleProcessTest.php
PHPUnit 3.8-g55a6dd0 by Sebastian Bergmann.

Configuration read from /Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/phpunit.xml.dist

....E.E......E.....E..........EE..............EEE..EE.......E..  63 / 100 ( 63%)
E.E................E....EE.......E...

Time: 29.55 seconds, Memory: 6.75Mb

There were 18 errors:

1) Symfony\Component\Process\Tests\SimpleProcessTest::testStartAfterATimeout
fclose(): 89 is not a valid stream resource

/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:95
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:80
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/ProcessPipes.php:62
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:938
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Process.php:229
/Users/romain/Documents/workspace/symfony/src/Symfony/Component/Process/Tests/AbstractProcessTest.php:490
```

And of course, I solved the issue, tests are now OK.

Commits
-------

d84df4c [Process] Properly close pipes after a Process::stop call