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.
Allow PDO drivers custom methods to trigger errors/exceptions

Moved a few definitions from php_pdo_int.h to a new php_pdo_error.h
header file that can be included if drivers need PDO's own error
handling to be triggered within custom methods (e.g. PDO::pgsqlLOBOpen).
Refactored custom PDO_pgsql methods to trigger errors/exceptions

BC Break: the custom methods were previously just return false on
failure. Now they throw an exception with a proper error message.
An hopefully welcome improvement, but some application might be
depending on the old behaviour. FWIW the PDO::pgsqlCopy* methods
are not documented, even though they are available since 5.3.x.
Fixed Bug #42614 (PDO_pgsql: add pg_get_notify support)
fix CVE-2013-2110 - use correct formula to calculate string size
Merge branch 'PHP-5.3' into PHP-5.4

* PHP-5.3:
  fix CVE-2013-2110 - use correct formula to calculate string size
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  fix CVE-2013-2110 - use correct formula to calculate string size
Merge branch 'PHP-5.5'

* PHP-5.5:
  fix CVE-2013-2110 - use correct formula to calculate string size
Fixed bug #64960 (Segfault in gc_zval_possible_root)
Merge branch 'PHP-5.3' into PHP-5.4
Update NEWS
Merge branch 'PHP-5.4' into PHP-5.5
Update NEWS
Merge branch 'PHP-5.5'
Add NEWS for PHP 5.3.26
Merge branch 'PHP-5.3' into PHP-5.4
Merge branch 'PHP-5.4' into PHP-5.5
Merge branch 'PHP-5.5'
PHP 5.5.0RC3 NEWS