Maintenance class provides a method for getting a fresh reference
of the MW services container instance. Let's make use of these in
maintenance scripts now that we have it.
NOTE: There are still some static methods like in refreshLinks.php
that makes use of services that we can't use this method for now.
Change-Id: Idba744057577896fc97c9ecf4724db27542bf01c
User::findUsersByGroup has a hard limit of 5000 users, so put it
in a loop. While we are there, replace a deprecated method, handle
failures and make the output a bit more pretty.
Change-Id: I5cc93f17a70dfcdc6ed5f1b57e11ebfd7bf9d76c