Modified type & return values of openPort function.
Addded new callback function as argument to serialRead & serialReader functions.
Reconstructed control of openPort in flushBuffer function.
Reconstructed control of openPort in doflash function before Leonardo reset.
Reconstructed control of openPort in serialReader.
Added exception handling for setDTR/setRTS functions as well as flush function in flushBuffer.
Rearranged try-catch blocks in serialWrite function. Added specific exceptions that Serial::SerialImpl::write function may throw.
Removed system out statements.
* Removed process and thread variables declaration in Unix.
* Removed getThreadId function declaration.
Removed unecessary perror in serialWrite function.
Added flushInput and flushOutput functions in serialReader in order to remove unecessary data for Linux OS.

Conflicts:
	Codebendercc/CodebenderccAPI.cpp
Added functionPrefix as argument to openPort() in order to distinguish from which function comes the exception (e.g. flushBuffer(),doflash(),serialReader()).
Correct mispelling in MSG_LEONARDO_AUTORESET macro.
Updated Serial::SerialImpl::flushInput() & Serial::SerialImpl::flushOutput() functions in win.cc file.
Updated flushInput and flushOutput in serialReader in order to remove unecessary data for both Windows & Linux OS.

Conflicts:
	Codebendercc/CodebenderccAPI.cpp
Removed serialPort.flush and added serialPort.flushInput / serialPort.flushOutput in flushBuffer function.
Added flushBuffer exception prefix before exception message in flushBuffer().
Added one more parameter to the error_notify function in order to distinguish plugin errors from plugin warnings. The parameter is optional and its default value is set to zero.
Merge branch 'jun6' of https://github.com/codebendercc/npapiPlugins into jun6
Update RegCloseKey() / RegOpenKeyEx() error codes.

Update RegCloseKey() error code 6 to appear as PLUGIN_WARNING
Update RegOpenKeyEx() error code 2 to appear as PLUGIN_WARNING
Turned all flushBuffer function notifications into plugin warnings.
Return a special value for 'Resource busy' error.
Merge branch 'jun6' of https://github.com/codebendercc/npapiPlugins into jun6
Typo