Parallelize GenerateBuildActions

Modify the Generate phase to call GenerateBuildActions inside a
goroutine to allow parallization.  All modules from a single
moduleGroup are called from a single goroutine, and the goroutines
that processed all dependencies must have finished, so the only
change to the semantics of GenerateBuildActions implementations
is around access to globals.  Locks are added to the lazily
created package context variables and to the live tracker.

Reduces run time by ~33%.

Change-Id: I62a515acf86f1dcecb093ded83444b920ff603be
5 files changed
tree: 92eb3a1bf3636d0b139c89f2bf59cf4d44099e3c
  1. blueprint/
  2. Blueprints
  3. bootstrap.bash
  4. build.ninja.in