xapian-bridge C port

endlessm/eos-sdk#2463
The `g_assert` is a strong enough indication that it's needed IMO, but I'll add a comment regardless.