Debug Memory Tracking, File Iteration on Linux

Totally overhauled the file iteration API and extended support to
Linux/POSIX.

Fixed a bug (more of a typo) that was preventing anything referencing
the new thread.hpp from compiling on Linux/POSIX.

Added memory allocation/deallocation counting to the Memory namespace
functions, but only when the library is compiled in debug mode.

Added a global new/delete hook, which forces all memory allocations to
go through the allocation/deallocation functions in the Memory
namespace.

This is all to allow for memory leak detection.

Fixed a bug in SmartPointer.