(bug 40340) Fix cache issues with changing user groups
* migrateUserGroup.php: Call User::invalidateCache
* While at it, also fix the issue where User::clearInstanceCache
did not clear cache for User::getGroups.
Although it does clear the caches of methods used to calculate
other group-related lists (such as User::getEffectiveGroups),
the one for the query from user_groups was still cached in
$this->mGroups.
Presumably this was forgotten when this pattern was introduced
as the instance cache precedes the user_group table.
Change-Id: I22abdba00f8ccf587a3d7696e57970ed4653afc8