index: always queue `remove_entry` for removal
index: always queue `remove_entry` for removal

When replacing an index with a new one, we need to iterate
through all index entries in order to determine which entries are
equal. When it is not possible to re-use old entries for the new
index, we move it into a list of entries that are to be removed
and thus free'd.

When we encounter a non-zero error code, though, we skip adding
the current index entry to the remove-queue. `INSERT_MAP_EX`,
which is the function last run before adding to the remove-queue,
may return a positive non-zero code that indicates what exactly
happened while inserting the element. In this case we skip adding
the entry to the remove-queue but still continue the current
operation, leading to a leak of the current entry.

Fix this by checking for a negative return value instead of a
non-zero one when we want to add the current index entry to the
remove-queue.

jeffhostetler/public_libgit2,stewid/libgit2,stewid/libgit2,saurabhsuniljain/libgit2,Corillian/libgit2,saurabhsuniljain/libgit2,leoyanggit/libgit2,leoyanggit/libgit2,Tousiph/Demo1,leoyanggit/libgit2,joshtriplett/libgit2,magnus98/TEST,joshtriplett/libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,KTXSoftware/libgit2,saurabhsuniljain/libgit2,yongthecoder/libgit2,yongthecoder/libgit2,stewid/libgit2,joshtriplett/libgit2,KTXSoftware/libgit2,Corillian/libgit2,yongthecoder/libgit2,Corillian/libgit2,jeffhostetler/public_libgit2,Tousiph/Demo1,jeffhostetler/public_libgit2,stewid/libgit2,magnus98/TEST,Tousiph/Demo1,leoyanggit/libgit2,stewid/libgit2,leoyanggit/libgit2,saurabhsuniljain/libgit2,Tousiph/Demo1,Tousiph/Demo1,Corillian/libgit2,leoyanggit/libgit2,saurabhsuniljain/libgit2,yongthecoder/libgit2,saurabhsuniljain/libgit2,joshtriplett/libgit2,jeffhostetler/public_libgit2,joshtriplett/libgit2,magnus98/TEST,KTXSoftware/libgit2,yongthecoder/libgit2,joshtriplett/libgit2,KTXSoftware/libgit2,magnus98/TEST,magnus98/TEST,magnus98/TEST,stewid/libgit2,jeffhostetler/public_libgit2,Corillian/libgit2,jeffhostetler/public_libgit2,Tousiph/Demo1,Corillian/libgit2,yongthecoder/libgit2