rename trec->state, pending & refactor reWait
remove rewait commit optimization (too hairy)