Autotools: read git commit hash at compile time

Also do as cmake to avoid full recompilation when the hash changes.
Fix bug in 81badf: char_type and double do not have the same size
Merge remote-tracking branch 'github/build-bot-master' into bleeding-edge-master
2014.11.24-22.00