xapian-bridge C port

endlessm/eos-sdk#2463
Use `g_clear_error()` so that subsequent calls can reuse `error`.