Optimize|Builder|qmake: Avoid numerous python invocations when parsing

versions.pri is better pre-generated once and then reused multiple
times. The old way caused a multitude of python processes to be
spawned, as the version numbers were parsed out for every .pro file
separately.