internal/stdlib: add semanticVersion function
internal/stdlib: add semanticVersion function

Logic for resolving the semantic version in Zip is moved to the
function semanticVersion.

For golang/go#39973

Change-Id: I5c9215a4cc326d2a9c5db79f33509656ec0b0065
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/247398
Reviewed-by: Jonathan Amsterdam <e3d3698b2ccd5955e4adf250d0785062d0f9018b@google.com>

golang/pkgsite,golang/pkgsite,golang/pkgsite,golang/pkgsite