Added thread/ISR synchronization and platform specific API
Added critical section, reworked atomic operations, begain platform abstraction