cw.c: use gnulib xalloc module

In particular, use xstrdup and xzalloc.

Remove cw-specific code from our internal setproctitle, and ensure
that the proc title is set the same whether we use our implementation
or the system's.
Remove ifexit, ifexit-else and ifnexit instructions, and ! and @ commands.