use CMake; add mempig_log, daemonize_me

Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>