dates.YearLocator doesn't handle inverted axes

All other Locators are derived from RRuleLocator, which has the following check inside its `__call__` routine:

    try:
        dmin, dmax = self.viewlim_to_dt()
    except ValueError:
        return []

    if dmin > dmax:
        dmax, dmin = dmin, dmax

YearLocator just gets values for `dmin` and `dmax` in the same manner as above and goes on using them without checking for ordering and swapping if necessary. This leads to only one tick on axes using YearLocator.