Refactor|Materials: Relocated Materials::rebuild() logic to def_main.cpp

The Materials collection has lacks the knowledge of how the materials
were originally interpreted from definitions, so therefore it cannot
action a "rebuild".