Refactor the goto cleanup; statements out of add.c and remove.c, and move what the cleanup: label did into a function. Signed-off-by: Dan McGee <dan@archlinux.org>