add and use updateExternalDBGroups function, fixes #49641
This enables plugins to add/remove groups in an external authentication
service when a group is added via the MediaWiki interface without relying
on the related Hooks. Relying on the Hook would mean that a plugin cannot
use User::addGroup or User::delGroup to add/remove groups comming FROM
the authentication service, as these functions would call the hook and
then redundantly add these groups to the auth-service again.
Change-Id: Ia04d5bb30831a89dfc66128e3c335bbe07f724b6