Make varobj::children an std::vector
This patch makes the children field of varobj an std::vector, and
updates the fallout.
One note is that varobj::parent must be made non-const. The reason is
that when a child deletes itself, it modifies its writes NULL to its
slot in its parent's children vector. With the VEC, the const didn't
made the parent's children vector content const, only the pointer to it,
but with std::vector, even the content is.
gdb/ChangeLog:
* varobj.h (struct varobj) <parent>: Remove const.
<children>: Change type to std::vector.
(varobj_list_children): Return std::vector const reference.
(varobj_restrict_range): Change parameter type to std::vector
const reference.
* varobj.c (varobj_has_more): Adjust.
(varobj_restrict_range): Change parameter type to std::vector
const reference and adjust.
(install_dynamic_child): Adjust.
(update_dynamic_varobj_children): Adjust.
(varobj_list_children): Return std::vector const reference and
adjust.
(varobj_add_child): Adjust.
(update_type_if_necessary): Adjust.
(varobj_update): Adjust.
(delete_variable_1): Adjust.
* ada-varobj.c (ada_value_has_mutated): Adjust.
* mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.