More test cases + bug fixes.

Added more test cases.

The semantics of optional messages weren't documented in the protoc-c
docs so I wasn't detecting them right.  Fixed.

Repeated field processing in the text format generator was broken.
Clean up new cruft from new tests.