Make repository searches more robust

Issuing HTTP GET requests so /katello/api/v2/repositories yields inconsistent
results. The exact same search can return a correct list of results or an empty
list. Compensate for this by adding some polling logic to
`Repository.fetch_repoid`. This produces more consistent results:

    $ nosetests tests/foreman/api/test_repository.py -m test_redhat_sync_1
    .
    ----------------------------------------------------------------------
    Ran 1 test in 51.665s

    OK
Merge pull request #1800 from Ichimonji10/repo-search

Make repository searches more robust