[PATCH v2 30/32] tools: mtk_image: split the code of generating NAND header into a new file