Ports functional iterators from allong.es (#15)

About half of the tests are ported, others to follow.