scripts: Fix error if spirv-tools dir had no .git (#2346)
external_revision_generator.py generates a UUID for
VkValidationCacheEXT objects created by the layers, based on
the commit ID of the HEAD revision in the spirv-tools repo
used to build those layers. This implicitly required that
the spirv-tools source is hosted in a Git repository, which
is not the case in all validation layers build environments.
The script has been modified to accept *either* a path to
a Git working directory to query *or* a path to a file whose
contents are SHA1-hashed (if necessary) and treated as the
"commit ID" for the project.
Call sites for the script in the CMake and Android build paths
have been updated to use the --git_dir approach by default,
which matches the pre-existing behavior.