(Bug 45013) Remove duplicate aliases

This changeset will remove duplicates both on set, add and remove
operations so the store does not holds duplicate aliases for a
single entity. It will also remove them in get operations so they
will not show up in reports or in the UI even if they do exist in
the store. They will although show up in the diff after new set,
add or remove operations. Slowly all erroneous entries should go
away, but it will take some time. When the store is clean the
uniquness filter on get operations can be removed, but it should
not be very important to do that.

This changeset seems to not interfer with normal use of the UI
or the EditConflict handling, that is the diff-patch operations.
Still check that normal operation is not hampered after merging
this, and as soon as possible check that existing erroneous
items can be clensed for duplicates. That means inspect the
database for some of those items before and after set, add and
remove.

Change-Id: I847513a2d640fd8c6c554d33102e1aa0d35166e6