Fix closeness sorting issue and enhance ip resolution workflow

- Fix #24

Enhance IP resolution workflow by fallback to sort by population if IP could not be detected or city could be found using provided IP