Add custom formatter to listpages.py

Custom format can be applied to the following items extrapolated from a
page object:

    site: obtained from page._link._site
    title: obtained from page._link._title
    loc_title: obtained from page._link.canonical_title()
    can_title: obtained from page._link.ns_title()
        based either the canonical ns name or on the ns name in the
        language specified by the -trans_to param
    onsite: obtained from pywikibot.Site(trans_to, self.site.family)
    trs_title: obtained from page._link.ns_title(onsite=onsite)

Added tests for Link.ns_title().

Change-Id: Ia911be7fb45a1e29515208b1b54ee6a213ffc29e
Merge "Add custom formatter to listpages.py"