Add a `repeat` function to the prelude

Implements a part of RFC 235.

[breaking-change]
auto merge of #18468 : jakub-/rust/iter-repeat, r=alexcrichton

Implements a part of RFC 235.

[breaking-change]