instrumentation: Add preBuild and postBuild hooks for ninja

Allows instrumentation indexing and callbacks to occur at the start or end of
every `ninja` invocation.
10 files changed