Solvers: removed duplicate output

Fixes issue 4129 by passing result through set before returning
Corrected position of ordered and set tomaintain canonical ordered list
Added test cases for issue 4129
Removed redundant test cases
Merge pull request #2690 from avichaldayal/4129_multiple

Solvers: removed duplicate output