Merge pull request #357 from Nekotekina/master

SC_Semaphore improved and detached from (r)wxSemaphore
FP: flush m_code_level & check emptyness of m_end_offsets
Merge pull request #359 from raven02/patch-2

FP: flush m_code_level & check emptyness of m_end_offsets
Paritally revert #359
Merge pull request #360 from raven02/patch-3

Paritally revert #359
Merge pull request #362 from Nekotekina/master

rCriticalSection & rSemaphore removed