Do not use random tag for tagging sandbox repository
Enforce version number rules for compatibility with semver.org

- Add test for invalid pre-release numbers
Refactor TestTagRelease to use has_local_tag() and get_tag_prefix()

With this commit, TagRelease tests should not depend on the particular
implementation of the tags on the sandboxes anymore. Additionally, we are now
reusing the GitRepository  methods (which we should unit test somewhere else)
instead of duplicating them in the Test class.