ParallelCompile: Parallelize D3D linking This adds a new linking state to Program. If a Program is in linking state, on the one hand the foreground thread may continue issuing more GL calls, and on the other hand the background linking threads may be accessing Program internally too. Without a proper constraint there must be conflicts between them. For this purpose, we block any further GL calls to Program until it's actually linked. In addition, we prohibit parallel linking an active program, so that ProgramD3D does not have to worry about such similar conflicts. Also changes the WorkerThread to support limiting the number of concurrently running worker threads. BUG=chromium:849576 Change-Id: I52618647539323f8bf27201320bdf7301c4982e6 Reviewed-on: https://chromium-review.googlesource.com/1127495 Commit-Queue: Jie A Chen <jie.a.chen@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>