Fix OMERO version number generation

- Fix a bug in the server upgrade page where the previous version number was
calculated to 5.-1
- Correctly parse the version numbers using semver.org conventions
- Define list of previous minor versions for each major version
- Do not import the re module globally
Restore use of the environment variable as the release number
Add explanations for the hard-coded get_previous_version function

Also wrap the error in an Exception() when previous version is undefined
Use tuples rather than lists
merge dev_4_4 -D org -I include -E exclude: PR 346 (Training update april 13 1)
merge dev_4_4 -D org -I include -E exclude: PR 361 (Further corrections to troubleshooting)
merge dev_4_4 -D org -I include -E exclude: PR 367 (Fix OMERO version number generation (rebased onto dev_4_4))