FORGE-1084 Add DISTINCT keyword to generated JQL queries.

This ensures that duplicate elements from the query result are not
serialized in the resource representations.