[HttpFoundation] Fix PdoSessionHandler to work properly with streams