Fixes #73: replace call to get_role_users with sql.

Hi - this may not be the best fix, I mentioned some alternatives in issue#73 . All I want to do is stop the call to get_role_users from triggering the debugging call/warning in get_records_sql when we have users with multiple role assignments in the course.

This patch would apply to tag v1.2.8 not the head of master although doing that is easy enough as well.

Rest of commit message:
The call to get_role_users was triggering a call to 'debugging'
in get_records_sql because the call could return more than one
instance of the same user (u.id) if that user had >1 role assignments
in a course.
The debugging message generated is:
"Did you remember to make the first column something unique in your
call to get_records? Duplicate value '2736' found in column 'id'. "