Correct ADPI data aggregation in reasoner.
Added rules from test to reasoner (not yet tested!).