Adding support for valgrind and forcing the Memory class to zero initialize buffers if valgrind is detected to be running.