shelve: refactor allowables to specify sets of valid operations
This will allow us to have --patch and --stat as standalone operations that
don't require --list, as well as pairing them with --list.
rebase: check that the bookmark is still valid when restoring (
issue4669)
After a rebase --abort, we attempt to restore the previously active
bookmark. We need to ensure that the bookmark still exists.