[Yaml] fix for a HHVM bug
made Cookie stringification more robust
minor #10380 fixed some HHVM bugs (fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

fixed some HHVM bugs

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

This is a workaround for facebook/hhvm#1161. I made the change as the workaround does the same thing and the eval is part of unit tests.

Commits
-------

d014dac made Cookie stringification more robust
fa24749 [Yaml] fix for a HHVM bug