Cumulative changes from work branch.

Improved texture resource allocation.
RenderScript base class changes allows cleaner + clearer script code.