Revert "Revert "Merge pull request #959 from dimagi/sqlreport""

This reverts commit 45d2fd81b7176f5c3212940843c58cce71cdb7ad.
updates to sqlreporting to make tests work
refactor sql report columns to have a more explicit class hierarchy
Merge pull request #209 from dimagi/sqlreporting

Sqlreporting