Fix active threads endpoint

Previously, pagination was done before reducing from content to threads,
which meant that fewer threads than requested could be returned and that
the number of pages returned could be incorrect.

@jimabramson