Add general reduction plumbing starting with Java Script::reduce().

Requires coordinated change in frameworks/rs.

Bug: 23535724
Change-Id: I2fee6750cf542948d8fa87a98441002c4d84f36e
3 files changed