Implemented debian style version comparison

Since debian has the most experience with versions, I decided to go with
it.  The implementation is a little versbose, but the test coverage is
pretty good so it can be improved in the future.