move a lot of the write calls into smatrix_rmap_sync

this makes disk backed matrices a bit slower for now but is necessary
to prepare for the async/background write change
cleaning up :)