v0.5.1

Deduplicate undo-flag and LXD bridge-detection code across the setup
subcommands (goconst fix); no user-visible behavior change. Adds a
githooks/pre-commit hook running check.sh.