Fix aggregation with complex WHERE bug

Aggregation maps are now serialized to EDN before storing in the DB