Add -E option for chip erase, remove duplicated code

Corresponding to flashrom svn r30 and coreboot v2 svn r1815.
6 files changed