Set an LDAP error code when failing ldap_bind due to null bytes

Some applications check a LDAP link's error code after seeing ldap_bind
fail due to a null byte bind attempt and hence incorrectly receive the
last set error code.

Fix by setting an LDAP error code before returning in this case.
Merge branch 'PHP-5.4' into PHP-5.5

* PHP-5.4:
  Set an LDAP error code when failing ldap_bind due to null bytes
Merge branch 'PHP-5.5' into PHP-5.6

* PHP-5.5:
  Set an LDAP error code when failing ldap_bind due to null bytes