Initial version of artifact definition validator.

@destijl for code review.

CL is ready for review but please do not merge with upstream, just yet.
Are we a single quote project? This is really going to mess with my head, since GRR is double, but I don't care too much either way.