Test case for #1427

(cherry picked from commit fea189c4aeaf832414f312311af93e10b999dd4e)
Test case for #1428

(cherry picked from commit a1b41e920dbcaebbd4d3ea44903b276e47969bb4)
Http\Cookie::__toString() should not throw exceptions

(cherry picked from commit e242b14a704b98524534c12db8e8e00a97d294c7)

Conflicts:
	ext/http/cookie.c
Fix #1428

(cherry picked from commit 6840ca8b3110001cdb11172335fe9dc2937b67f3)

Conflicts:
	ext/http/cookie.c