[FIX] Allow comparison of wmf versions

The current LooseVersion class used doesn't really interpret the
wmf-version numbers like they behave. The wanted behaviour is the
following: 1.23 < 1.24wmf10 < 1.24

Now LooseVersion interprets the second version number as: 1.24.wmf.10
and so tries to compare 'wmf' with the third number of another version
if the first two are the same (e.g. 1.24.1) which does fail (on
Python 3) or says that 'wmf' is newer than '1' (which is the wrong order
as wmf-versions are like alpha versions).

This adds MediaWikiVersion class to the pywikibot.tools package which
interprets 1.24wmf10 as 1.24 with wmf number 10. If the wmf number is
set a identical version number without it (e.g. 1.24) is treated as
newer.

In theory only pywikibot.site and tests.site_tests does need it, because
all comparisons don't touch the third number, but I changed them to have
a consistent usage. Only generate_family_file doesn't use it, because it
doesn't use the pywikibot package at all and the comparison is safe with
current version numbers.

Change-Id: I03dee15be9bb156fde22b9c75d9aac1730b78648