Fixed #23728 -- Exit makemigrations with an error if no changes found

A new flag `--exit` has been added for this. If no changes that need
migrations are found, `makemigrations` exits with error code 1 when this
flag is used.