Fixed inconsistencies generated by _md_shrink.
This is causing assertion failures in ASSERT_CONSISTENT if an entry
used to have a non null identity. Since the new entries will be
concentrated at the beginning of the array, we shall "erase" the old
entries that are at the end of the array and that won't be used anymore.
This is enough to fix the core dump issues found in the testsuite of
httpie in Fedora Rawhide.