(bug 65156) use LooseVersion to compare mw versions

LooseVersion from distutils.version enables a more sensible way to
compare mw version directly e.g.

>>> from distutils.version import LooseVersion as LV
>>> LV("1.23wmf1") < LV("1.23wmf2") < LV("1.24") < LV("1.24wmf1") < LV("1.24wmf10") < LV("2.1")
True

Change-Id: I98c280bc1d89789475a30df31d0644807e6acdd6
Merge "(bug 65156) use LooseVersion to compare mw versions"