Use ANY VALUES instead of ID IN() to speed up Postgres
fix empty case, yay for unit tests
Merge pull request #9 from nyaruka/result-optimization

Result optimization