Update the ldapsearch tool to provide a --countEntries option that can be used
to count the number of matching entries. The count will be displayed as a
comment at the end of the results, and will also be used as the exit code for
the tool. This addresses issue #1013.
This commit also includes test cases for this issue as well as the use of
alternate human-readable names for certain types of controls. These test cases
are more applicable to issue #989, but need the --countEntries option for
verifying that the LDAP subentries control is working as expected.