table: Fix schema mismatch between memtable reader and sstable writer
table: Fix schema mismatch between memtable reader and sstable writer

The schema used to create the sstable writer has to be the same as the
schema used by the reader, as the former is used to intrpret mutation
fragments produced by the reader.

Commit 9124a70 intorduced a deferring point between reader creation
and writer creation which can result in schema mismatch if there was a
concurrent alter.

This could lead to the sstable write to crash, or generate a corrupted
sstable.

Fixes #7994

Message-Id: <9fdb834338de463863baf19f10191c3d6bf009ea@scylladb.com>

scylladb/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla