jit: make gdb_object::symtabs an std::forward_list
Replace the manual linked list with an std::forward_list, simplifying
the memory management. This requires allocating gdb_object with new and
free'ing it with delete.
gdb/ChangeLog:
* jit.c: Include forward_list.
(struct gdb_symtab) <next>: Remove field.
(struct gdb_object) <symtabs>: Change type to
std::forward_list<gdb_symtab>.
(jit_object_open_impl): Allocate gdb_object with new.
(jit_symtab_open_impl): Adjust to std::forward_list.
(finalize_symtab): Don't delete symtab.
(jit_object_close_impl): Adjust to std::forward_list. Free
gdb_object with delete.