Switch over to calloc from malloc/memset and check returns when possible
Fix resource leaks in sysinfo and actually use C++ idioms instead of coding C++ like C