When XTERMCC_SET_RGB changes an indexed color value, divorce and modify the profile instead of just changing the color table. This makes it durable in the event that the session profile is later changed. Fixes issue 3013.