add: static inline function binsearch_child_idx has been added.
change: to use binary insertion sort algorithm to logic of appending child segment.
change: function binsearch_child_idx has been renamed to bsearch_child_idx for understandability reasons.
change: to use function bsearch_child_idx in seg_getchild_idx function.