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

I'm struggling a bit to understand this one. ``$ULN[]_PATH`` is always a new string, isn't it? We're not supposed to be testing for the same library several times, so it should always be empty. Perhaps you can explain face to face later.