Remove slow call to iter\filter and closure creation on each call

The change improves the performance significantly without losing
any readability.

Basic benchmark:

bin/conway run -n 100 examples/gosper-glider-gun.php

From:
real    0m17.290s
user    0m16.725s
sys     0m0.563s

To:
real    0m11.150s
user    0m11.136s
sys     0m0.013s