[build-script] Clean submodules where applicable (#4553)
When building Swift from a non-clean checkout, the `git reset` that
occurs on subprojects that include submodules may fail if the submodule
is deemed to have been changed (for example, by running the autoconf
scripts).
When cleaning the projects, ensure that `git submodule` is used to clean
submodules and reset them to their original state as well, so that the
project can be reset successfully.
Issue: SR-2524