redundant conditions in paginate-query

For a list call on images, when a sort_key is applied, the query
generated has redundant values for 'created_at' condition. This happens
when the sort_key list has duplicate values.

Fixes Bug #1212994

Change-Id: Icd62c2886d9ab608418ba9b4dc25cd06a4146992
Merge "redundant conditions in paginate-query"