Replace tree_port_mode with tree_subkind
Finally replace param_t with a subtype of tree_t
Support more general parameter names