refactor unique constraint handling

  - modify unique constraint test to test the actual constraint its
    interested in. mssql will fail the first constraint because two
    null values are passed in for the a_or_b constraint test
  - check for multiple error messages related to unique constraints