BUG #13297: Don't enable modules needed only for tests.
BUG #13297: Don't enable modules needed only for tests.

Currently if a module is enabled, and its test module depends on additional
modules (specified using TEST_DEPENDS), then those modules are automatically
enabled. That's incorrect and causes issues with modules needing MPI being
enabled simply because a testing module needs it.

This patch fixes this issue. Instead of add test modules to the graph used for
building the depencies, we parse the tests separately, only enabling those that
have all their dependencies met.

Also added an advanced option VTK_BUILD_ALL_MODULES_FOR_TESTS (which is
available only when BUILD_TESTING is ON) that when set to ON (OFF by default)
can revert to old behavior i.e. enable test dependencies automatically.

Change-Id: I871a3cbef52aa0e030a0e3cf16446771a9404127

keithroe/vtkoptix,sankhesh/VTK,candy7393/VTK,candy7393/VTK,SimVascular/VTK,SimVascular/VTK,sankhesh/VTK,sumedhasingla/VTK,gram526/VTK,gram526/VTK,hendradarwin/VTK,keithroe/vtkoptix,candy7393/VTK,sankhesh/VTK,mspark93/VTK,berendkleinhaneveld/VTK,SimVascular/VTK,candy7393/VTK,ashray/VTK-EVM,candy7393/VTK,sankhesh/VTK,johnkit/vtk-dev,collects/VTK,aashish24/VTK-old,jmerkow/VTK,demarle/VTK,aashish24/VTK-old,sumedhasingla/VTK,jmerkow/VTK,hendradarwin/VTK,collects/VTK,jmerkow/VTK,jmerkow/VTK,berendkleinhaneveld/VTK,mspark93/VTK,sumedhasingla/VTK,biddisco/VTK,hendradarwin/VTK,ashray/VTK-EVM,aashish24/VTK-old,mspark93/VTK,SimVascular/VTK,candy7393/VTK,biddisco/VTK,gram526/VTK,demarle/VTK,jmerkow/VTK,johnkit/vtk-dev,demarle/VTK,sankhesh/VTK,msmolens/VTK,jmerkow/VTK,demarle/VTK,sumedhasingla/VTK,msmolens/VTK,SimVascular/VTK,aashish24/VTK-old,aashish24/VTK-old,msmolens/VTK,sankhesh/VTK,sankhesh/VTK,SimVascular/VTK,sankhesh/VTK,ashray/VTK-EVM,msmolens/VTK,gram526/VTK,berendkleinhaneveld/VTK,collects/VTK,msmolens/VTK,hendradarwin/VTK,sumedhasingla/VTK,mspark93/VTK,gram526/VTK,ashray/VTK-EVM,biddisco/VTK,keithroe/vtkoptix,biddisco/VTK,mspark93/VTK,demarle/VTK,ashray/VTK-EVM,johnkit/vtk-dev,gram526/VTK,johnkit/vtk-dev,hendradarwin/VTK,msmolens/VTK,SimVascular/VTK,demarle/VTK,collects/VTK,johnkit/vtk-dev,collects/VTK,ashray/VTK-EVM,aashish24/VTK-old,berendkleinhaneveld/VTK,berendkleinhaneveld/VTK,demarle/VTK,SimVascular/VTK,msmolens/VTK,biddisco/VTK,johnkit/vtk-dev,keithroe/vtkoptix,keithroe/vtkoptix,jmerkow/VTK,candy7393/VTK,mspark93/VTK,gram526/VTK,sumedhasingla/VTK,keithroe/vtkoptix,mspark93/VTK,sumedhasingla/VTK,keithroe/vtkoptix,berendkleinhaneveld/VTK,demarle/VTK,berendkleinhaneveld/VTK,hendradarwin/VTK,candy7393/VTK,biddisco/VTK,gram526/VTK,collects/VTK,ashray/VTK-EVM,mspark93/VTK,keithroe/vtkoptix,sumedhasingla/VTK,johnkit/vtk-dev,jmerkow/VTK,hendradarwin/VTK,biddisco/VTK,ashray/VTK-EVM,msmolens/VTK