Prefer index name when mapping unique constraint errors

When using migrations to create indexes instead of sync or when unique
index name has fields with underscores (was problem at least with
postgres implementation) then it was not possible to set custom error
message, because mapping the error thrown from database always failed.
Fixed by using indexName always for mapping the error if possible.
Update changelog
Promisify tests
Do not explicitly call done in the tests of customized error message of
unique constraint error
Merge pull request #2568 from jamonkko/master

Prefer index name when mapping unique constraint errors