Add tools error stack and check return from H5Dreference call. Tested: CMake and h5committest
Tested: local linux