Improve sum_tree

- Store parent to prevent random reads
- Don't use children as works is a full sub-tree

review1018002