namespace: Extracted keyword finding logic to a separate class.

The idea of this refactoring was to split keyword finding logic away
from way too long and pretty horrible `Namespace` class.  The main
motivated was to ease adding new features (e.g. #888) and fixes
(e.g. #1771) to the keyword finding logic. New `KeywordStore` is still
too closely coupled with `Namespace`, but didn't want to do much
bigger changes in a minor release.

@guykisel, any comments about the changes are appreciated. It seems to
me that the approach I used was very similar to what you have done in
your fork to implement #1771.