geoip: Fix local state initialisation

When running with threaded(yes), local state was never initialised,
because we did that at module load time, which happens in a different
thread. Instead, we now initialise the local state on each function
call, unless already initialised.

This fixes #228.

Reported-by: Fabien Wernli
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>