rhbz1056849 - Fix wrong stats calculation.

The stats updates were counting messages instead of words.
Also add events to update / evict cached stats when uploading a document, deleting a document, and doing copy trans.