std::io: expand the oneshot/periodic docs.

Examples!

Fixes #14714.