Upstream changes
- Merge branch 'publishedcounter' into 'master'
- fix publishedcounter not working for feed counters
- add missing count_published to get_cats() and fix some misleading indenting
- implement special counter display when viewing by published, similar to marked
- Merge branch 'retry-night-mode-switch' into 'master'
- attempt to retry night mode switch if we're offline
- Merge branch 'bugfix/media-thumbnail' into 'master'
- Look for media thumbnails in more places.