switch case activity report to sofabed models

http://manage.dimagi.com/default.asp?146924
Merge pull request #4881 from dimagi/case-activity-to-sql

switch case activity report to sofabed models