See extended description

1. Moved set_heap() and get_heap() to memory.c
2. Simplified object_alloc() and dealloc()
3. Removed use of null (-1) in memory management
4. New function get_segment_count()
5. Running out of memory gracefully handled now
6. GC now every GC_FREQUENCY times
7. insert_node() bug fixed; function cleaned up
8. Fixed incorrect test for checking whether tree is empty