switch destroy_shared_mappings to use list_for_each_safe

instead of mucking about with ->next by hand