Make uniquify return an iterator instead of list
Sparsity constructor filters duplicate map pairs

The canonicalized list of map pairs built in the Sparsity constructor
is uniquified before being passed on to the sparsity builder.