xapian-bridge C port

endlessm/eos-sdk#2463
See comment above about `collapse` vs `collapse_key` which also applies here.