[Process] Close unix pipes before calling `proc_close` to avoid a deadlock

see http://php.net/manual/en/function.proc-close.php
Merge branch '2.2' into 2.3

* 2.2:
  [HttpKernel] added a check for private event listeners/subscribers
  [FrameworkBundle] fixed registration of the register listener pass
  [Form] Fixed regression causing invalid "WHERE id IN ()" statements
  [DependencyInjection] fixed a non-detected circular reference in PhpDumper (closes #8425)
  [Form] Fixed regression in BooleanToStringTransformer from ed83752
  [FrameworkBundle] removed obsolete code
  [Process] Close unix pipes before calling `proc_close` to avoid a deadlock

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php
	src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php
	src/Symfony/Component/Process/Process.php