Set citydef_uid to NULL when skip_loc is active

Make two different sql queries when to set citydef_uid to NULL skip_loc
is active. Update function update_locations.