[HttpFoundation] Fix PdoSessionHandler to work properly with streams

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Ref: https://github.com/symfony/symfony/pull/10931#discussion_r18387931
Yes because this doesnt only apply to this method.