Added interruption points in doflashBootloader function.
Set thr value equal to new created thread value in flashBootloader function.
Added isAvrdudeRunning=false when doflashBootloader throws an unknown exception.
Reformatted doflashBootloader code.
Reformatted flashBootloader code.