Consolidate version handling in imports. It has drawbacks if we copy
code to different places in our code base. Having tests for the version
conversion has advantages too.
The invalid version has not anymore using -1 but the maximum integer as
indicator because an empty version is higher than any other version.
Change-Id: I8608b9509660f4253e8e5ba7397d964defe35e51
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>