configure: Refuse to do anything if a submodule has a dirty working tree

This isn't a full fix for #522 / #835 but it prevents the unrecoverable loss of work without changing the behavior of configure generally.

If configure drops committed local work, it can be recovered from the reflog.