A version such as 3.40 or 3.40.0-Bratislava. Leading or trailing
whitespace and a leading v are not accepted.
Version parts, with a patch of 0 when omitted and a suffix when supplied.
This function parses syntax. serializeQgs enforces the supported output major versions.
QgsError INVALID_VERSION for invalid syntax or numbers outside
the safe integer range.
Parse a QGIS version into numeric parts and an optional release name.