Fix API documentation problems

We were getting failures in our API documentation generation.  Turns out they were due to using *args and **kwargs in rST strings without code-quoting them.  This patch fixes that.

Since I was there, I thought I'd apply the suggestions given by Vincent in <https://code.launchpad.net/~lifeless/testtools/haslength/+merge/144578>.