Document signature of function to be passed to recurrence().
Use ddoc'd unittest instead of inline code of questionable workability.
Show examples for each possible function form.
Use new cartesianProduct implementation for 2-argument case as well.

The original implementation will now only be used when one or both the
ranges is either non-forward or infinite. The new implementation is also
more attribute-friendly (works with pure, nothrow, @nogc, @safe), so
this also fixes issue 13091.
Bug number shouldn't appear in ddocs!
Merge pull request #2534 from quickfur/issue13091

Use new cartesianProduct implementation for 2-argument case as well.
Merge pull request #2531 from quickfur/issue9535

Document expected function signature in std.range.recurrence