Fixed a bug for avoiding extending a existing link to a pattern .
Removed patternVarMap from HTreeNode again.
Fixed using the right nodes to extend next gram patterns.