api: Extract repo ID validation to a separate function (RhBug:1018284)
doc: clarify repo_id_invalid() slightly.