Only store commit hash when index is clean.
Rewrite qt.conf with macdeployqt, only rewrite BuildInfo.h if anything changed, halt on any build errors
Move commit hash info into separate source file for faster builds.