xapian-bridge C port

endlessm/eos-sdk#2463
Any reason not to use `g_clear_pointer (&priv->cache_dir, g_free);`?