macro: rework how we define cleanup macros

There's now a generic _cleanup_ macro with an argument. The macros for
specific types are now defined using this macro, and in the header files
where they belong.

All cleanup handlers are now inline functions.
path-util: unify code for detecting OS trees

This also makes sure we always detect an OS tree the same way, by
checking for /etc/os-release.
util: make generation of profcs PID paths nicer