Add a unit test to verifies that attribute uniquing works so it doesn't break again.

The folding set details can be subtle and broke twice in the last couple of weeks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172313 91177308-0d34-0410-b5e6-96231b3b80d8