make dump_syscall_rec take a record arg

now we can pass both the previous, as well as the current record.
introduce a DONE state for use in the previous syscall record.