Add create_sid to session_set_save_handler and SessionHandler

A lot of code already existed to allow a custom create_sid handler, but
lacked a specific implementation.

Therefore I have added a 7th (optional) argument
session_set_save_handler, to allow a user function to be supplied for
session id generation.

If a create_sid function is not supplied, the default function is
called in its absence to preserve backwards compatibility.

Likewise create_sid only added to SessionHandler class, and not the
interface to maintain backwards compatibility. If the result is not
overridden, the default is called.
Tests, fixes and optimisations

* Amended existing tests to cater for new functionality.
* Implemented fixes and optimisations recommended by NikiC
* Added create_sid to the registered interface. This was breaking
tests. It also now breaks BC for people implementing the interface
directly instead of extending the class.
Merge branch 'PHP-5.5'

* PHP-5.5:
(re)allow WBMP detection with system libgd
provide getbmi and skipheader not exported functions in gd_compat.
enable WebP with system libgd when available
Merge branch 'PHP-5.5'

* PHP-5.5:
  enable WebP with system libgd when available
  (re)allow WBMP detection with system libgd provide getbmi and skipheader not exported functions in gd_compat.
fix copy/paste in error message
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix copy/paste in error message
Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
Merge branch 'PHP-5.5'

* PHP-5.5:
  Fixed incorrect check. SEND_REF may be executed before DO_FCALL when EX(function_state).function is not yet set to the calling function.
Remove curl wrappers
Merge branch 'PHP-5.5'

* PHP-5.5:
  Remove curl wrappers
Fix bug #64458 (dns_get_record result with string of length -1)
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #64458 (dns_get_record result with string of length -1)
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Fix bug #64458 (dns_get_record result with string of length -1)
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  Fix bug #64458 (dns_get_record result with string of length -1)
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
Merge branch 'PHP-5.5'

* PHP-5.5:
  Fix bug #64458 (dns_get_record result with string of length -1)