WebComment: Add & amend tests, fix SQL statement

* Adds and amends unit tests.

* Fixes the SQL create statement for cmtRECORDCOMMENT.

* Improves the upgrade script.