Split xmemdup0 into its own module.