closes#1028
- add support for count(distinct *), avg(distinct *) and sum(distinct *)
- min and max don't really make sense with distinct, so didn't add those
Beefed up transaction implementation, still needs tests
and cleanup of nested transaction queues.
Left todo:
- Fix commented out tests
- Fix oracle driver's transactions