Create alloc.c

Implementations of malloc, realloc and free. According to rigorous testing, it performs close to the libc equivalent functions.