image: improve UBI image sizing on NAND devices