xapian-bridge C port

endlessm/eos-sdk#2463
I was intentionally not aligning the arguments, as I find it a bit pointless and not very useful. I can reindent everything to follow that if you think it's worth it though.