postgres incompatibility in InstanceGroup.get_hosts()

The original code fails in postgresql with:

"No operator matches the given name and argument type(s).
You might need to add explicit type casts."

It looks like the problem is that postgres doesn't do
implicit casts, so I changed the code to check a different column
that didn't require any.

Change-Id: I9342ec2bfbdd991d5f7a238eca59af003c7e7eac
Closes-bug: 1292963
Merge "postgres incompatibility in InstanceGroup.get_hosts()"