Improvements in compileInfo.h

This fixes issue #25. In particular:

* Avoid empty git_hash tag in the case of no .git information
* Only generate compilation date in make release
* Avoid touching compileInfo.h file if it has not been updated
* Adjusted version_via_rest.test to work with the new "nogitversion" case