JSONRPC/REST: Add calculateResourceAgg() API call.