Copy locale modifiers when creating XimInstCallback [v2]

Locale modifiers may be freed whenever XSetLocaleModifiers gets
called, even if the locale hasn't changed. This means that we cannot
save a pointer to those modifiers in the XimInstCallback record and
must, instead, make a copy of them instead.

This fixes a problem uncovered when running wish under libasan as
follows (on current Debian unstable):

	$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6 wish

Reported-by: Vittorio Zecca <zeccav@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>

v2:
	Remove incorrect 'else' token found by @alanc
4 jobs for use-after-free-locale-fix in 8 minutes and 40 seconds (queued for 2 seconds)
Status Name Job ID Coverage
  Prep
passed check-commits #5663363

00:00:25

passed container-prep #5663364

00:00:13

 
  Build
passed build #5663365

00:07:55

 
  Deploy
failed check-merge-request #5663366
allowed to fail

00:00:19

 
Name Stage Failure
failed
check-merge-request Deploy
No job log