Fix php7 igbinary serialization and unserialization
Fix php7 igbinary serialization and unserialization

Fixes #1 and some occurences of #12

In php7, zvals are no longer stored as pointers (`zval*`) in objects and arrays (like in php5), but instead as values(`zval`).
In order to properly serialize references or shared values, use the underlying array/reference's reference count pointer. For objects, continue using objec

Fix the tracking of reference ids when serializing. Previously, the bugs in reference id generation caused the error "igbinary_unserialize_ref: invalid ref

- The code was previously calling igbinary_serialize_array_ref twice for array references(One for the reference, another time for the array). This is diffe
- Continue to call igbinary_serialize_array_ref only once for objects.
- Unserialize should add reference ids for same non-reference types it did in the php5 extension code(IS_STRING,IS_LONG,IS_NULL,IS_DOUBLE,IS_FALSE,IS_TRUE)

Convert references' `zval`s to references immediately, so that when unserialized, the references will be shared

Fixes the segfault mentioned in https://bugs.php.net/bug.php?id=72134

This includes https://github.com/igbinary/igbinary7/pull/8 , which should be merged first

Misc:

- Refactor unserialize: Create function igsd_append_ref to add references when unserializing
- Fix some compiler warnings, use more suitable PHP7 macros in several places.

Jan-E/igbinary,Jan-E/igbinary,Jan-E/igbinary,Jan-E/igbinary,Jan-E/igbinary