[IMPR] Simplify templateRegex in _MultiTemplateMatchBuilder
[IMPR] Simplify templateRegex in _MultiTemplateMatchBuilder

- re-use _ignore_case function
- add magic word 'msg' to the namespaces list
- use a dict for format string replacements

Change-Id: I51d77370808e79335002fa6843fb07de3bc4b69b

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