Add semantic versioning class

This is a class to represent a semantic version. It ensures that it
abides by the pattern described in http://semver.org/, and allows for
equality, similarity (equal except for build), and that comparisons work
as expected.