Add unique constraint to ResourceClass.

When ResourceClass() DB model was added, unique constraint on the 'name'
column was missed in initial migration script. To fix it, unique constraint,
`uniq_resource_classes0name` was added.
Fixed column `name` description tin DB model.
Added new exceptions - `DuplicateEntry` (should be raised if duplicates
found) and `ResourceClassExists` - should be raised if user create
two entries with same name in 'resource_classes' table.
Functions create_resource_class() and update_resource_class()
refactored - now they can raise `ResourceClassExists` exception if duplicate
names in 'resource_classes' table found and use `with` statement for
work with session.
Tests added.

Change-Id: I042c54d943b501661e24d9e0ca94574731b23dcf
Closes-Bug: #1217393
Merge "Add unique constraint to ResourceClass."