xapian-bridge C port

endlessm/eos-sdk#2463
Hmm, that's odd because I never saw this. I'll test it on some less powerful hardware to see if there's indeed a race condition.