Refactorings

- use dedicated function for finding untracked repos (api, testability)
- Only retrieve minimal information about unmanaged repos (performance)
- retrieve url in spawned thread (performance)
- undo some hacks added to other functions (api, testability)

Once all commits are squashed, this should look much nicer (less impact on the existing code, smaller functions). Then only a unit test for cmd_find_unmanaged_repos is needed.