Add tests for subclassing validators.

Also fix a small issue with subclassing compound validators.