Handle more local dev version cases

Due to an oversight in testing (the tests for local dev versions were
all running with PBR_VERSION in the environment) we did not handle
enough variety of local development versions.

Specific new cases we now handle:
 - untagged trees - where git describe returns just the sha
 - tags with versions with less than two components (e.g. 1)

Change-Id: Ieaeca592b6ba26c5da50dcad3fb6e7551431d50e
Co-Authored-By: Robert Collins <rbtcollins@hp.com>