add unitest | fux bug in QuerySegment | make TrieManager looks better

1. add unitest for FullSegment
2. add unitest for QuerySegment
3. add unitest for TrieManager
4. add testdata for TrieManager
5. fix bug in QuerySegment
6. make TrieManager looks better