ISPN-4002 Allow the reduce phase to store elements into result cache 

Master only. Do not integrate yet until reviewed by Infinispan team. See https://issues.jboss.org/browse/ISPN-4002 for more details