MDL-47618 quiz statistics: fatal error with groups.

The problem was that the names of query placeholders were changing. The
fix was to do things ourself, rather than using get_in_or_equal.
MDL-47618 mdl: make Oracle in_or_equals hack reusable, and use it.