Delete chunks from the inventory first during gc - better version

Delete orphaned chunks in the inventory from the inventory first, and then
the target in a single loop.  This also ensures that if the process aborts,
no chunk is present in the inventory that has already been deleted from the
target.
Merge branch 'development' of https://github.com/NewsNow/brackup-nn into development