Bug fix: HDFFV-8930
(Commit fix for Quincey.)
Description:
    Correct errors in ID wrapping code, add some small optimizations, and make
certain that all IDs of a given class can be used, especially when wrapping
around.  Also, enable ID reuse for error classes/values, property lists and
datatypes.  Includes regression testing for ID wrapping.
    Note that this change does not apply to the trunk, since that ID manager
code is using 64-bit IDs and doesn't worry about wrapping around.

Tested: h5commtested.