Pkg2: reinstate prerelease/build versions

@StefanKarpinski
I managed to convert VersionNumbers to weights in a general way (i.e. including prerelease/build fields). The implementation is quite complicated and at times rather arbitrary, but it's hidden away from the main API, and it works fine (and I think fulfills our purposes). Performance hit seems negligible for reasonable use cases (surprisingly).
This means that requirement files will again deal with prereleases/build versions just like they do in Pkg1, and therefore that a requirement such as `julia 0.1- 0.2-` is again meaningful. See commit messages and new tests in `test/resolve2` for more details (or just ask).