Initial version of artifact definition validator.

@destijl for code review.

CL is ready for review but please do not merge with upstream, just yet.
Users who implement their own collectors should create a subclass with an AppendCollector method that appends their own classes.  The subclass could optionally raise if the type_indicator does not match any existing class.