xapian-bridge C port

endlessm/eos-sdk#2463
On further inspection, it seems to me that this function should adhere to the contract of either setting `error_out` and returning `NULL`, or not setting `error_out` and returning a populated JSON object (even if that object contains no results).