Add NonNegativeNumber type checker
Fix Commit type checker

Had an inverted check for context.repository, so was in practice totally
broken.
Convert /createcommentchain operation to use typed parameters

This adds some previously missing input range checking on 'offset' and
'count'.

While touching the code, drop the old file_context.{old_sha1,new_sha1}
parameters, which weren't used.
Improve input validation when creating file comments

We didn't check that the file existed, or that the commented lines existed
in the referenced file version.
Improve input validation when creating commit comments

We didn't check that the commented lines existed in the commit message, or
that the commit was part of the review.
Reject comment state changes for non-issues

If one user has an issue resolved or reopened as a draft change, and
another user in the meantime converts said issue into a note, reject the
state change when the first user submits.
Add test for basic comment creation and manipulation

Also some drive-by testing framework fixes/additions.