ut-stats simple: close stream before measuring temporary space used.

With compressed streams, we cannot guarantee that the statistic is
updated right as write() is called, since we do not know the compressed
size of the block right away.

However, when the stream is closed, we wait for all write requests to
finish which will cause the statistic updates to occur as well.
fixup! Add compressed_stream::memory_usage.