[PATCH v2 15/30] qapi/introspect: Factor out _make_tree()