Introduce std.range.generate

`generate` (name up to debate) simply takes a callable, and turns it into a range. Particularly useful for things like random number generators, functions with state, or functions that modify a global state.

As requested in the forums. Pinging @MartinNowak.
> Surely we have a better way to do it than that old C++ hack.

Better ways, probably. But that's up to the client, not us, so we are doomed to have to support it I guess.