MDL-44692 Assign: Remove use of groupmembersonly from new API

A new API function (used only by the assign module) relied on the
groupmembersonly flag, which will be removed shortly.

In order to maintain identical behaviour, a new flag specific to
the assign module has been created. The API function has been
modified, and the place where the assign module calls it now
checks its internal flag.

(The deprecated version of the old function (in case anybody else
ever uses it) now treats 'separate groups' mode as indicating that
the group members only filter should be enabled.)

I also renamed the function to avoid confusion. The function does not
check all the different ways in which a module may not be available
to an individual user - it is currently impossible to do so while
retaining high performance. (You need to construct modinfo for
each user in order to find out.) This fact is independent of any
change to groupmembersonly.