Fix incremental build when dummy version.cpp is generated (dotnet/coreclr#8547)
This change fixes a problem with incremental build on Unix. When the
version.cpp is generated by the build.sh as a dummy one with no real
version stamp in it, it is recreated every time the build.sh is run.
That means that build needs to rebuild that file and also re-link
all the components that include it.
This change tests the file presence and contents before actually
regenerating it.
Commit migrated from https://github.com/dotnet/coreclr/commit/
101168c7a41058436f592bd9cb0a1a70f0f1b0ad