Refactor|Material: Relocated logic from Material::setDefinition() to def_main.cpp

Similarly, Material lacks the knowledge of how to update itself
after a definition reset so therefore this logic should instead
be implemented externally.