[PATCH v3 29/32] tools: mtk_image: split gfh header verification into a new function