Add halt and resethalt during flash program
Merge pull request #49 from ECNU3D/master

[TARGET] Fix #48 for unexpected program running (reset and halt)