Use asynchronous routines to build Metal shaders and pipelines for MacOS.

On Mac, Metal will trigger an xpc to a process to compile shaders and
link pipeline programs. Sometimes that process can crash or hang. By using
an asynchronous call with a timeout we can at least recover in this case.

Bug: chromium:974219
Change-Id: I179daa86979b1217458e7be210fccd5edcbffdd0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222884
Reviewed-by: Christopher Cameron <ccameron@chromium.org>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
3 files changed