mds: fix iterator invalidation for backtrace removal

- Don't increment before we dereference!
- We need to update the iterator before we delete the item.

This code is changed in master, so this fix is for cuttlefish only.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>