Add unit tests for "==~branch" and changed the semantics of Version.isBranch.

Version.isBranch now also returns true for "~master".