Fixes Zone #contains? n+1 query performance.

Following a similar logic to #4579, the `Zone` `contains?` method performs a n+1 lookup. This affects performance with zones that contain a lot of members.

I think that the existing tests in `zone_spec` cover the changes in the code as no new functionality has been added.