Bug fixes and raw code for optimized allocator

In this commit, some bugs have been fixed in old simple allocator. A new
optimized allocator has been written. The initial version is in
"Optimized_Allocator" folder.