Catch and log DatabaseErrors in assessment.api.self.create_assessment.

TNL-812
Added test for DatabaseError in assessment.api.self.create_assessment.

TNL-812
Merge pull request #635 from edx/usman/tnl812-catch-db-errors-in-api

Catch and log DatabaseErrors in assessment.api.self.create_assessment.