Added autoSizeResult modifier.

It can be applied on an OUT parameter that will receive a count. That count
will then be used as the capacity of the mem<TYPE>Buffer result.

This commit also includes a subset of the changes required for OpenCL support (WIP).