[Ratchet] Fixes Session_serialize_handler bugs

Fixes some errors calling Session_serialize_handler:
+ Fixes #1659
+ Fixes cboden/Ratchet#162

Fixes other ini_set ini_get issues with Session:
+ Fixes #1555

Probably fixes a few tests in Zend/bad too, will look into it.