Fix encoding of test data
Change paillier average to encrypt denominator
Implement average and count queries for logdb