Initial version of artifact definition validator.

@destijl for code review.

CL is ready for review but please do not merge with upstream, just yet.
there's standard ways to do this, we should use them.  unittest.TestLoader.discover