Problem: Memory allocation functions don't have their own place. Solution: Move memory allocation functions to alloc.c. (Yegappan Lakshmanan, closes #8717)