Add debugging and a script for issue count calculation.

There have been some reports of issue counts failing to calculate
correctly. The cause is not obvious, so we need better debugging.

This adds some debug logging to show all the calculation state for a
given review request's issues, which users can send us when they
encounter problems.

It also adds a reset-issue-counts management command, which will reset
issue counts for particular review requests, or all review requests if
passing --all.

Reviewed at https://reviews.reviewboard.org/r/6366/