Fix bugs with writing nddata and ndmisc.

nddata and ndmisc are managed as a combination. Manage information of nddata maybe writen to the area of ndmisc vice versa.
'fastboot -w flashall' will flash boot.img recovery.img and syste.img and erase /data and /cache.
If manager information of ndmisc is writen to the area of nddata, erasing of nddata will destrory them. It will lead fatal errors.
If manager information of nddata is writen to the area of ndmisc, erasing of nddata can not clean up nddata at all. It also will lead fatal errors.
The error is like this:
ERROR:ret shouldn't be -6!!!!