[cleanup] return has_extension result in deprecated hasExtension method
[cleanup] return has_extension result in deprecated hasExtension method

use remove_last_args to ignore the old "unknown" parameter

Change-Id: I53ebe1aa802b4ca18e3c03613a1464cac0af0bf4

wikimedia/pywikibot-core,wikimedia/pywikibot-core,PersianWikipedia/pywikibot-core