Implement `xstrdup` and replace `strdup` calls

This is a `strdup` wrapper that will succeed or exit the program.