title: Stop the fs2-stream after a timeout
body: <p>I want to use a function similar to <code>take(n: Int)</code> but in a time dimension:
  <code>consume(period: Duration</code>. So I want a stream to terminate if a timeout occurs. I know that I could compile a stream to something like <code>IO[List[T]]</code> and cancel it, but then I'll lose the result. In reality I want to convert an endless stream into a limited one and preserve the results.</p>
  
  <p>More on the wider scope of the problem. I have an endless stream of events from a messaging broker, but I also have rotating credentials to connect to the broker. So what I want is to consume the stream of events for some time, then stop, acquire new credentials, connect again to the broker creating a new stream and concatenate two streams into one.</p>