lib: replace fprintf_right with fprintf_col
lib/tree: add node_max_cnt
lib: add log_u32
lib/tree: improve tree_graph_r