cec: refactored threading/locking - added windows native instead of pthread-win32...