Ninja: Add cmNinjaBuild utility class and refactor target construction to use it
This adds the cmNinjaBuild
utility class that aids to construct ninja build statements.
The existing ninja build statement construction code is refactored to use the new class.