made SGScript system (its memory allocation) to be thread-safe
- TODO refactor old allocator code into something useful
fixed the last issues, ran all tests, added a memory test