Add Stream.unfold

This generates a possibly finite stream of values.

Unlike `Stream.iterate`, which passes the previously created value to the function,  `Stream.unfold` passes an accumulator to the function. Hence the different name.

(EDIT 2013-09-15: Change name from generate to unfold based on José's request in #1713)