Merge pull request #39 from codebendercc/UpdatedDoflash

Plugin version 1.6.0.7
Added function CodebenderccAPI::closeTab.
This functions interrupts and joins running thread in order to avoid plugin crash when user closes tab before running thread has finished.
Set thr value equal to new created thread value in doflash function.
Added boost::this_thread::interruption_point() in doflash function:
before CodebenderccAPI::resetLeonardo
before CodebenderccAPI::flushBuffer
before CodebenderccAPI::runAvrdude
before CodebenderccAPI::createCommand
before CodebenderccAPI::LeonardoSketchControl
Added boost::this_thread::interruption_point() in resetLeonardo function.
Added boost::this_thread::interruption_point() in unixExecAvrdude function.
Set thr value equal to new created thread value in serialRead function.
Added boost::this_thread::interruption_point() in serialReader function.
Defined THREAD_INTERRUPTED macro.
Added THREAD_INTERRUPTED as return value when interruption exception is thrown in unixExecAvrdude.
Added control in runAvrdude return value in order to terminate doflash when interruption exception is thrown in unixExecArdude and winExecAvrdude.
Added interruption points in doflashWithProgrammer function.
Set thr value equal to new created thread value in flashWithProgrammer function.
Set thr value equal to new created thread value in serialRead function.
Added interruption points in winExecAvrdude function.
Reformatted winExecAvrdude function.
Added call to winKillAvrdude function when interrupted exception is caught.
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.
Reformatted code of CodebenderccAPIJS.cpp file.
Reformmated code of MiscFunctions.cpp
Reformatted CodebenderccAPI.h file and added comments.
Reformatted code Codebendercc.cpp
Reformatted CodebenderccAPI::openPort code.
Reformatted CodebenderccAPI::closePort code.