Add uniqueness constraints for student training models; check for integrity errors
Merge pull request #336 from edx/will/uniqueness-and-integrity

Uniqueness constraints for student training