New lastOf implementation

This version has constant space usage for infinite lists, and
doesn't force entire structures (so it works with infinite trees). It
probably has inferior constants to the previous implementation (can any
micro-optimisation be done here?), but otherwise it's more or less
strictly better than what we have in 3.7.

There is a drawback compared to the foldlOf'-based implementation: if
you have a structure that ends in many RPures (for instance,
lastOf (folded._Just) ([Just ()] ++ replicate 100000 Nothing), it will
use space proportional (linear, I think) to the number of RPures.