Regression test for #1345
(cherry picked from commit 98b149b869e3519375a2398f3ba4d1aba3ddf19d)
Dropped PHALCON_SEPARATE in favor of SEPARATE_ZVAL
(cherry picked from commit 823ab0475482f8a8ab2cc0e4aeb8d046fabfad10)

Conflicts:
	ext/kernel/memory.h
Fix #1340
(cherry picked from commit 2c7c1f8b9bbb903ae5a33eeb02b70cd8f8e8ce8b)

Conflicts:
	ext/kernel/memory.h
Bug fixes