convert the Latest Tab SELECT logic to ORDER BY, with accurate IS_LOCALIZED
This is a big overhaul of two key pieces of plumbing used by the Latest Tab, prompted by #2024 (closed). It converts the SQL query from a "selection+sort" to a pure "sort", so that the sort order behaves nicely in a wide variety of contexts. It should make the Latest Tab start by showing only entries in the current language for many languages now, with unlocalized entries available by scrolling. It should also show entries even in specific setups like @Glennmen's with only custom repo and in a non-English locale. !886 (closed)
This also converts the locale selection logic to be based on the
LocaleList methods, so it should be better at selecting the right localized entries.