util.c: add stricter checks for pkgver conformance (v2).

There was another case where it now was failing: "fs-utils-v1.00_1".

Previous code didn't take into account that a valid version might also
contain a non digit after '-'.

Added more tests to the testsuite to verify its correctness.