toolbox-version: grab only the commit hash instead of the commit message

This change prevent toolbox-version to keep too many lines when it updates
src/version.h, which was happening when the commit message contains the
word "commit".

Signed-off-by: Patrick Rouleau <pfrouleau@gmail.com>
Merge pull request #49 from pfrouleau/review/teach_toolbox-version_to_only_returns_the_commit_id

toolbox-version: grab only the commit hash instead of the commit message
Fix the expectation of an extraneous checksum during restore/check in the last read

When the last blocks are written and are less than cs_per_checksum, a last
checksum is written for them. During restore/check, we compute how many
bytes must be read (blocks+checksum).

However, there is an error in the condition that add one more checksum to
be read during the last read. That condition must takes into account the
number of blocks already copied.

Signed-off-by: Patrick Rouleau <pfrouleau@gmail.com>