namedb: trie implementation, unittests