MemoryManagerDaemon Class

Broke up the functionality of the daemon.php file into proper methods
and created a class out of it. The setup.php file now requires the
memory_manager_daemon.php file. Daemon code is minimal due to the
changes.

The code could still use some code style cleanups, and it's not perfect
but this is a vast improvement.