stream_truncate that will respond to truncation, e.g. through ftruncate. Closes feature request #53888.