Wire the new caching infrastructure to the static file serving handler

There's still lots of work to do to make the caching layer transparent,
but this is an important step in making sure the loading cache is
actually working.  From initial testing, it is, and it rocks!

Server boot time has considerably decreased as file information is
loaded and cached on demand (and pruned after a while to keep memory
usage low).

The job thing should be revisited, though. It is currently performing
way too many unneeded system calls; I might use timerfds and epoll for
it later, but right now a thread that calls sleep(1) seems to do the
job fine.

Directory watcher is gone, as we don't need to use inotify to know when
a file information has changed.  The cache will prune old data and if a
new request comes along, it will be automatically updated.  Not sure if
this is the best approach, but with 5 seconds of time to live per cache
entry, this seems a good compromise.

I haven't throughly reviewed this change, though. I'm quite tired.
Initial testing seems to point this is working, but there might be some
gotchas here and there.  Note to self: review the changes, as they're
large (11 files, ~240 insertions, ~650 deletions) and touch some
sensitive and well-tested parts of the code.
Use the new caching in freegeoip sample app

This fixes a race condition that would happen between querying SQLite
and adding it to memcache. Now the caching stuff handles all that.
Fix potential memory leak in strbuf

(Found with clang static analyzer)
Sleep for more time if there were no jobs to perform