cmNinjaTargetGenerator: use `GetObjectFileDir` where possible

Lots of code simplification.
1 file changed