xapian-bridge C port

endlessm/eos-sdk#2463
Agreed about the space after `*`, but I do like to logically group similar functions in header files. `xb-database-cache.h` was a bit messy so I cleaned it up here, but I'd like to keep some blank lines here and there.