Guarantee that raster pipeline always uses finite stack

In release builds, clang and gcc do tail call optimization, which
reuses the same stack space for each stage. In debug builds, that
doesn't happen. If we're going to start generating arbitrarily long
pipelines (eg from SkSL), we need to ensure that we're not going to
overflow the stack.

I first looked at ways to force tail call optimization (Clang's
musttail, and optimization pragmas). These are all nonportable, and
don't work on some of our supported toolchains.

Instead, this version includes a new RP execution mode that does away
with the tail-calling entirely. Instead, each stage just returns the
next stage to call. This ruins our optimized stage ABI, obviously, but
we're only doing it in debug builds.

MSVC can do tail call optimization, but testing shows that it falls over
with raster pipeline (too complex?). As a result, we always use the new
technique there.

Our new unit test measures stack consumption (which is the thing we're
worried about anyway) to make sure that TCO or our new technique is
successfully limiting stack usage.

Change-Id: Id0d419f97b53b0b57c82214c4a2f1f94e5ab6b3c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/566896
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2 files changed