Centralize much of the comment API update/create code.
Review Request #4760 — Created Oct. 15, 2013 and submitted
Centralize much of the comment API update/create code.
Most of the comment create/update code was duplicated, and some fixes
were missing from places. That code has now been centralized, making it
easier to maintain and to update.
Unit tests pass.