Version suffix of -dev-{%H,unknown-commit} for non-release installations

We now use the same method for version labeling here as in the TuLiP
repository, sans some backwards-compatibility stuff required in TuLiP.

The reference commit in the TuLiP repository is
71aefd0659904ccdb8553e5d5f2436933ea42728