Implementation of Item class destructor (clear_variables, remove_attached_buttons).