Fix bug in pkgrepo when switching to/from mirrorlist-based repo def

This adds a check to ensure that both of mirrorlist and baseurl aren't
specified, and also deletes mirrorlist when baseurl is specified (and
vice-versa). Additionally, rather than returning a string containing
errors when they are encountered, raise an exception.
Merge pull request #9344 from terminalmage/0.17-9133-cp

Fix bug in pkgrepo when switching to/from mirrorlist-based repo def