lib: replace deprecated xapian call 'flush()' with 'commit()'