Cleanups, including platform.h in cf-upgrade, and linking it to libcompat.