xapian-bridge C port

endlessm/eos-sdk#2463
double-underscores are technically reserved for compiler use, although I don't think it's a problem.