Create one single module for a script group

This changed the way we compile a script group. Instead of compiling
each batch into a seperate module, we now compile the whole script
group into one single module, with each batch as a function (of fused
kernels) in that module. This allows invoke to (fused) kernel
communication via globals variables.

Added commoand line options "-merge" and "-invoke". The former
accepts fused kernel names, input kernels, while the latter accepts
new invoke name, and the original invoke function.

Additional changes:

- Bail out on encountering any unexpected bits in the foreach
  signature of any kernel to fuse
- Made kernel fusion handle kernels without inputs.
    If a kernel only  takes global allocations but no inputs, bcc
    needs to use a different signature for the fused kernel.
- Included in rs info the exported variables for the fused kernel.
- Keep all metadata in merged module from the input modules. This
  would help correctly handling FP precision. (b/19098612)
- Handles Z (b/19610223)

Change-Id: I5553f86b2e58325f85649078d48685a38f12d62f
8 files changed