Better validate repository links

We need to validate in model context to be able to detect link to self.
Also use this for consolidation of error messages.

See also issue #532

Signed-off-by: Michal Čihař <michal@cihar.com>