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

Goes for the other ``test -z`` statements below as well.