Add qemu_strndup: qemu_strdup with length limit. Also optimise qemu_strdup by using memcpy - using pstrcpy is usually suboptimal.
Changed paths: