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
tex2lyx: support for glue lengths in InsetSpace
tex2lyx/text.cpp: add missing part of a comment