Add qemu_strndup: qemu_strdup with length limit.