Check for kernel chaining in ScriptGroup

b/21958851

bcc expects kernels chained up via input and output.
Check this in the runtime before passing ScriptGroup to bcc for
compiler fusion.

This serves the same purpose as
https://googleplex-android-review.git.corp.google.com/#/c/713267, but
provides additional checks in the runtime before bcc is even called.

Change-Id: I6004d577410ea1684f5043babadc1e1b885c4f6a
(cherry picked from commit 08e7693c13f895677b93537af3b6bc353318a81c)
4 files changed