Avoid "Transaction already in progress" errors in SiteStatsUpdate::doUpdate

* Also fixed TRX callback code to match documentation (wrong since 3b7c4f6)

Change-Id: I8c4ea7412e9f96912939c441c68090eacc42b3d4
Merge "Avoid "Transaction already in progress" errors in SiteStatsUpdate::doUpdate"