MDL-43395 dml: warn about invalid limit params

Help developers to find bugs by throwing a DEBUG_DEVELOPER message
rather than ignoring this case completely.
MDL-43395 quiz_statistics: use intval rather than floor

Floor returns a floating point value, which now throws warnings
when used as a limit param.