xapian-bridge C port

endlessm/eos-sdk#2463
Need to free `priv->database_qps` as well