style: refactor query to determine compatible versions
style: refactor query to determine compatible versions

Change query so that we're not likely to hit the limits on the maximum number
of items in a SQL IN clause when there are many versions for a pacticipant.

tancnle/pact_broker,pact-foundation/pact_broker,pact-foundation/pact_broker,pact-foundation/pact_broker,tancnle/pact_broker,tancnle/pact_broker,pact-foundation/pact_broker,tancnle/pact_broker