moved validation for rubrics and mixeval to model

I have moved the validation for the rubrics and mixeval templates
from the view to their respective models. During the process I have
also found a bug which happens when a user tries to edit a rubric
template but causes a validation error (eg. duplicate name). In those
cases even if the user fixes the problem (eg. change the name), the
LOM will have disappeared and causes invalid variables and indices
problems. I have figured out the problem was that if an error occurs
$this->data is never reset therefore the data would be lost.