Make shellcheck ignore user-created directories, and run it during pre-commit

At the moment, we shellcheck all the directories inside the tor directory, even user directories like .git, user-specified build directories, and directories that are added during tests.

This change will conflict with #30963 (moved), so it should be based on that branch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information