Parallelize ninja manifest loading

Split ninja manifests into independently-parseable chunks and parse
them in parallel. To achieve this, this change tracks two kinds of
locations on objects in the graph: ScopePosition and DFS location.

 * A ScopePosition is a Scope* parent pointer and an index
   (DeclIndex/u32). It records a position within the tree of scopes, and
   is used to evaluate strings and lookup rules as if the work had been
   completed in a single depth-first parse of the manifest tree.

 * DFS location: Records the position of a declaration within the
   depth-first-search order of the manifest tree. DFS location is used to
   lookup pools and default target nodes, which must be declared before
   they are referenced, but don't respect ninja scopes.

Bug: none
Test: ninja_test
Change-Id: Ib8f6c06df1149264f4c694409361211285f9974e
37 files changed