Refactor|Material: Use QList for Material's list of variant instances

Plus more cleanup refactorings.