bin/xbps-rindex: fix adding packages with reverts.
bin/xbps-rindex: add unit tests to test rindex behavior for adding packages with reverts.