CompletionWords: enable code coverage
CompletionWords: add unit tests for library_find_first()

It is either broken, or I didn't understand what should return the
function.
CompletionWords: fix library_find_first()
CompletionWords: simplify the code