New internal API for serialization and unserialization

This is a new proposed internal serialization and unserialization API for extensions.

The RFC is at https://wiki.php.net/rfc/internal_serialize_api

More info and tests are at  https://github.com/bukka/php-extest/blob/master/doc/serialize.md