[CMAKE] Add the -commit suffix to version number through obj/build.h
Summary:
The obj/build.h header is built by calling the share/genbuild.sh
script and contains the commit description generated by git (the short
commit hash, eventually suffixed by -dirty).
This will allow to compare version numbers entirely between autotools
and CMake, avoiding confusion.
This should definitely by moved to the version.h file, but it is kept
as is for now so it remains compatible with the current codebase and
autotools.
Test Plan:
ninja ./src/bitcoind -version
Check the suffix is the commit hash rather than -unk.
Reviewers: #bitcoin_abc, deadalnix, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D3916