Add test for garbage collector refcount method and optimize it
Add tests for collect and fix the behaviour
Fix the garbage collector activation behaviour
Add tests for memory class
Calls collect only for the buffer size is a multiple of buffer size step
Optimize the memory class
Call collect only if the garbage collector is enabled