Fix revert counting for non-language-specific counters
The change in d0fd394 did not update revert counting according to the
new treatment for non-language-specific counters; hence, reverts for
those counters (including the new Depicts counter) will not be counted
correctly without this change.
We also need to check that the action in the edit summary matches the
specified action for the counter, or else reverts will be counted once by
each language-agnostic counter.
This patch also adds some new unit tests around edit and revert counting
to increase confidence in the counters and help prevent regressions.
Change tag addition and checking is moved out of conditionallyIncrement
methods to facilitate testing those methods. Also removed is the check
that MW_API is defined; it is redundant with the 'action' parameter
check and complicates testing.