Added function that print process and thread ids for Unix
Removed boost::thread t from Constructor
Implementation of a global variable where all ports that are currently in use are stored.
Ports are removed from the list as soon as they are released.
3 functions are implemented: CanBeUsed, AddtoPortList, RemovePortFromList.
CanBeUsed: checks if port is in the list and returns true or false.
AddtoPortList: checks if port is already in the list and adds it if it is not.
RemovePortFromList: removes port from list when its use has finished.
Added mutex to lock vectorPortsInUseList in function AddtoPortList
Removed port check from functions flash, flashWithProgrammer, flashBootloader and added check in the new created threads.
Ports are added to vectorPortsInUseList as soon as the new thread is created and removed from vectorPortsInUseList before thread ends. Removed port check from function serialRead and added check in the new created thread serialReader.Port is removed from vectorPortsInUseList in function disconnect.
Added control in functions doflashWithProgrammer, doflashBootloader in order not to add them in vectorPortsInUseList when communication is "" or USB
Removed AddtoPortsList from serialReader and added it to openPort. Added control in do flash for Leonardo. For Leonardo the  port is added to vectorPortsInUseList when openPort is called, removed from it when closePort is called and then added again when the new port in which Leonardo connects is detected.
Added mutex to RemoveFromSerialPort function
modified openPort function type, added function AddtoPortsList before try catch in openPort, added AddtoPortsList before try catch in serialReader, call to closePort in serialReader when loop is interrupted, check the result of openPort function in doflash for Leonardo
Splitted CodebenderAPI.cpp in 3 files: CodebenderccAPI.cpp, CodebenderccAPIJS.cpp, MiscFunctions.cpp
Error handling in openPort function
Added comment to serialReader related to notify function
Added control if port string contains "\\\\.\\" on  Windows in functions AddtoPortsLists and RemoveFromPortsList
Call function AddtoPortsLists in if(found) and if (os==Windows) for Leonardo board.
Implemented new function unixExecAvrdude.
Added function unixExecAvrdude which makes a duplicate of the current process (fork) and replaces the entire new process with avrdude (exec). Added filesize function to use it in unixExecAvrdude so that we check if output file's size changes before kill avrdude process in case of hanging.
Merge branch 'dev' into multithreading

Conflicts:
	Codebendercc/CodebenderccAPI.cpp
Removed function GetThreadId.
Merge pull request #18 from codebendercc/multithreading

Multithreading