xapian-bridge C port

endlessm/eos-sdk#2463
Should have a comment explaining that you have to free the return value.