Recently got a MacBook Pro and decided to check how things build on
MacOS. Discovered that POSIX unnamed semaphores weren't implemented, so
I reimplemented them with conditional variable and mutex.
Additionally, fixed scripts and CMake on MacOS
Refactored strings functions to make them use supplied string
instead of allocating new ones.
Additionally, split String/Int.c into several files to avoid define
mess that was present before.
Added initial implementation (or wrapper) of the threading library.
It's rather basic, but should work for most of the tasks.
Unfortunately, spinlock implementation relies on GCC/Clang compiler
built-ins (or in-worst-case-scenario on Win32 - InterlockExchange).
In the future, I should revisit this code and fix/reimplement some stuff
(or add support for Windows XP).
Linking against static asan library was a mistake. Now this should
work better for other compilers. Also added script for running all tests
under different profiles.
Added Asan profile to help catch and fix various bugs (and indeed, there
were few of them).
Additionally, fixed bhunit macro to process arguments only once.