test/boost/sstable_datafile_test: scrub tests: extract corrupt sst writer code into function
test/boost/sstable_datafile_test: scrub tests: extract corrupt sst writer code into function

So the two tests having this almost identical code can shared it, and so
that it can be used by new tests.

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