dbcore: parse_sorted_query (#953)
Factor out parse_query from get_query_sort
Introduce parse_query_string for the common case

Most clients other than Library._fetch know what type they have!
The demise of get_query_sort (#953)

The type tests now live where they ought to live.
Remove SortedQuery (#953)

This turned out to be less useful than I was hoping.