Implement `Stream.flat_map/2`

Fixes #1642