placement-api: fix ResourceProviderList query
placement-api: fix ResourceProviderList query

The ResourceProviderList query use groupby without all grouped columns.
This works on mysql with unpredicable result, but don't for other RDBMS.

For example, postgresql gating jobs dsvm that use nova are currently
broken.

This change removes the unused consumer_id on first query,
and uses the primary key 'id' instead of 'uuid' the second groupby.
(Because groupby in postgresql requires a PK or all non-primary columns)

The fix is tested by gate-ceilometer-dsvm-tempest-plugin-postgresql-ubuntu-xenial job
here: https://review.openstack.org/#/c/427668/

closes-bug: #1660959
Change-Id: I6cc93ba0dd569d56696c9210d38dd2d77b4157c1

klmitch/nova,gooddata/openstack-nova,rajalokan/nova,openstack/nova,rahulunair/nova,phenoxim/nova,klmitch/nova,openstack/nova,rajalokan/nova,mahak/nova,gooddata/openstack-nova,jianghuaw/nova,klmitch/nova,openstack/nova,klmitch/nova,phenoxim/nova,jianghuaw/nova,mikalstill/nova,mikalstill/nova,rahulunair/nova,gooddata/openstack-nova,vmturbo/nova,mahak/nova,vmturbo/nova,vmturbo/nova,rahulunair/nova,Juniper/nova,mahak/nova,rajalokan/nova,mikalstill/nova,vmturbo/nova,Juniper/nova,jianghuaw/nova,gooddata/openstack-nova,rajalokan/nova,jianghuaw/nova,Juniper/nova,Juniper/nova