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. clear tmp result in QuerySegment to fix bug
5. make TrieManager looks better