Include buffer.h.
(x_activate_menubar): New function.
(set_frame_menubar): New arg deep_p. Callers changed.
Run various hooks here when deep_p is true.
(frame_vector): Variable deleted.
(syms_of_xmenu): Don't staticpro it.
(frame_vector_add_frame): Function deleted.
(menubar_id_to_frame): New function.
(menubar_selection_callback): Use menubar_id_to_frame.
(next_menubar_widget_id): New variable.
(set_frame_menubar): Use next_menubar_widget_id.
(free_frame_menubar): Get id from f->display.x->id.