Templatize pmem_tree