commit progress on D

- D (2012-11-12): Сортировка Шелла

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
Update memory management functions in alg.[hc]

- Return char* pointers so that we can stop worrying about derefencing.
- Add "#ifdef MEMDEBUG" prints for displaying memory usage.

Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>