Add better 'writes while shutdown' tests for replication