User analytics: support new review system

This is commit makes the user analytics code get the review information from the
new review table instead from the treenode table.

This change is part of issue #580.