Added smarter reallocation for trees and random children_amount in add_child test.