ninja: Factor out custom command order-only depends

This makes WebKitGTK's CMake build.ninja file go from 165M to 11M and
configure/generate in 5 seconds.
ninja: Factor out target-level definitions

Worth another 3M in the WebKit build.ninja file.