Converting sample report to pure SQL

Active-record based reports are very slow when the number of records
involved gets large.  This is an experiment to see if pure SQL can be
used instead to speed up the query.  Also, the AR version of this
report was not including participants who had never been assigned.
This new SQL version includes those missing participants.
Merge remote branch 'origin/release' into qa

Conflicts:
	api/ui/pull/sample_report.class.php