Add remove setup resource command

This finishes off #382. We overlooked this a bit when developing the command. The previous is only useful for re-running upgrade scripts. This command allows to remove the row completely so you can re-run install scripts.

I also refactored a little so there wasn't lots of duplicated code.