add initial, untested version of ldap_modify_batch

Add an initial, hitherto-untested version of ldap_modify_batch to the LDAP
module. It allows performing multiple modifications as part of a single
"transaction". This can be useful e.g. for the "change password" operation in
Active Directory (REMOVE the old unicodePwd and ADD the new one), but the
interface has been kept general.
fix redefinition of LDAP_DEREF_ALWAYS

By virtue of a copy-paste error, the constant LDAP_DEREF_ALWAYS was defined
multiple times. Now, it isn't anymore.
ldap_modify_batch: fix layers of indirection when fetching from hashtables

There is an additional layer of indirection between fetching a value from
a hash table and accessing its value. Fix the code of ldap_modify_batch to
reflect this.
ldap_modify_batch: hashtable key length includes NUL byte

The length of a key in a Zend hashtable also counts the terminating NUL
byte. Fix the code of ldap_modify_batch to reflect this.
ldap_modify_batch: use zend_hash_get_current_key and ..._type correctly

Fixes ldap_modify_batch to use the correct functions when obtaining hash
table keys and key types.
ldap_modify_batch: be robust when hashtable has wrong key type

Sometimes, the user keys a hashtable using integers where strings are
necessary. Fixed ldap_modify_batch to be defensive about this since
zend_hash_get_current_key isn't.
ldap_modify_batch: rewind modification array internal pointer

Fix ldap_modify_batch to make sure the internal pointer on the passed array
is rewound before the key type is checked.
ldap_modify_batch: check if modifications array consists of arrays

Add a check to ldap_modify_batch whether the modifications array (passed by
the user) only contains (associative) arrays and not values of a different
type.
ldap_modify_batch: use more macros

Fix ldap_modify_batch error messages to display the value of
LDAP_MODIFY_BATCH_VALUES and not the hard-coded string "values".
ldap_modify_batch: replace assert(0) with PHP error

If an unknown modification type is encountered and not correctly validated,
ldap_modify_batch would force an assertion error. Since asserts may not
always be on, fixed to display a PHP E_ERROR instead.
ldap_modify_batch: fix modtype/attrib confusion

Since the struct member mod_type is so bogusly named, the current code
attempts to take the string length and value of an integer. Fixed to use
the correct attribute.
ldap_modify_batch: free mod_bvalues only if not NULL

When cleaning up, ldap_modify_batch would iterate through the mod_bvalues
to free them even if the pointer was set to NULL (for REMOVE_ALL). Add a
NULL check around it.
ldap_modify_batch: remove a bogus comment

ldap_modify_batch contains a bogus comment in the validation section.
Remove it.
ldap_modify_batch: add a pair of basic tests

Add a success and a failure test of ldap_modify_batch, mostly matching the
ldap_modify tests.
ldap_modify_batch: fix whitespace

To match the rest of the file, use tabs for indentation, not four spaces.
ldap_modify_batch: Use macro values in allowed keys error message.
ldap_modify_batch: Use safe_emalloc to allocate all memory.
ldap_modify_batch: remove unused variables

tmpStr and tmpUint are unused. Remove them.
ldap_modify_batch: remove _ldap_hash_fetch bogus whitespace
ldap_modify_batch: rewind modinfo pointer too