Change module_*() functions to use D8 moduleHandlers and wrap them in enviroment specific drush_module_*() functions.

module_list() is deprecated, and should be removed from core, but the patch fails tests because the test bot uses Drush which in turn uses module_list().
See https://www.drupal.org/node/2300077.