Refactor: Functionize --create[-empty], --reset in crm_shadow
Make main() more readable and maintainable. Also remove the now-dead
code from main(). We're doing all three of these simultaneously because
they're so similar.
There is a slight behavior change: the reset command can now be forced
if the shadow file does not exist. By default (without --force), it
requires that the shadow file already exist. With --force, it will
create the file if it doesn't exist.
This is better aligned with the existing behavior of create and
create_empty: those require that the file not already exist, unless
--force is supplied, in which case they overwrite the file.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>