Added slug_check()

Changes the atexit() call in slug_malloc() to call slug_check() instead.
This function checks if any memory is still allocated and will debug it
with slug_memstats(), otherwise does nothing.