Fixes #4045: Repository name and label validations properly handled.

Repository name and label validation were being handled improperly
and without the same format as other model validations. This creates
and proper active record validators for each and provides a message
indicating to the user the scope of the validation (i.e. Product).
Sounds like there is a flaw here. same_attribute will be nil or may be even raise a "not defined" if attribute is nil. Do we have tests covering the attribute = nil case ?