Quality-Driven Detection and Resolution of Metamodel Smells