Added --modules flag for tests.

This allows the user to specify the modules to load during tests.
The modules are made available to the master and slave subsystems.

Review: https://reviews.apache.org/r/26796