Add tests and fixes for bm25() function.