Fix destruction order in zend_shutdown (bug #65463, #66036)

If Apache or a similar SAPI receives a signal during PHP processing
it calls zend_shutdown() without calling shutdown_executor().
	#65463: If a module like Gearman or Memcached is loaded,
in the unfixed version it is unloaded by zend_destroy_modules() before the
CG(CLASS_TABLE) is destructed. When CG(CLASS_TABLE) is destructed,
any pointers to methods (specifically around destruction) in the unloaded
module's .so are now dangling and the process segfaults.
	#66036: Any subclasses of an internal class like ArrayObject need
to be destructed in order: subclass first and then the internal class. In the
unfixed version zend_shutdown() clears the CG(CLASS_TABLE) from the head
of the list onwards, so internal classes are destructed first and user-defined
classes last. Internal classes are alloc/deallocated with malloc/free while
user-defined classes with emalloc/efree. If there's shared data between them
then efree() could be called instead of free() leading to a seg-fault.
Fix typo from commit 32314f6b6
Only destruct if EG(active) in zend_shutdown(). (bug #65463, #66036)
resource type is int
Keep folder mark style in this file
use zend_string_equals_ci
restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
fix NEWS for fcgi fix merge
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  fix NEWS for fcgi fix merge
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  fix NEWS for fcgi fix merge
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
Merge branch 'PHP-5.6'

* PHP-5.6:
  fix NEWS for fcgi fix merge
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
fixed path in test
Add an entry for bug#66060 (fixed in 5.5.8)
Use #66356 instead of #66714, as the latter is only a regression fix from the former.
Align entiries format to "Fixed bug #..."
Add missing CVE IDs for 5.6.0
Merge branch 'PHP-5.6'

* PHP-5.6:
  Add missing CVE IDs for 5.6.0
  Align entiries format to "Fixed bug #..."
  Use #66356 instead of #66714, as the latter is only a regression fix from the former.
  Add an entry for bug#66060 (fixed in 5.5.8)
exclude log2 usage which requires C99 support
avoid usage of 'type' before the null pointer check
data type fixes