geoip: Fix sign compare warnings

array_size() returns size_t, thus make iterator variables comparing
against it  size_t too to avoid a warning regarding comparison of
signed/unsigned.

Also cast some ssize_t variables passed to min() for the same reason.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>